Description
Algorithm
详细解释请看
【每日算法Day 68】脑筋急转弯:只要一行代码,但你会证吗?
C++ Solution
class Solution {
public:
double nthPersonGetsNthSeat(int n) {
return n == 1 ? 1 : 0.5;
}
};
详细解释请看
【每日算法Day 68】脑筋急转弯:只要一行代码,但你会证吗?
class Solution {
public:
double nthPersonGetsNthSeat(int n) {
return n == 1 ? 1 : 0.5;
}
};