Description
Algorithm
See detailed explanation
[Daily] Riddles algorithm Day 68: one line of code, but you will permit it?
C++ Solution
class Solution {
public:
double nthPersonGetsNthSeat(int n) {
return n == 1 ? 1 : 0.5;
}
};
See detailed explanation
[Daily] Riddles algorithm Day 68: one line of code, but you will permit it?
class Solution {
public:
double nthPersonGetsNthSeat(int n) {
return n == 1 ? 1 : 0.5;
}
};