Airplane Seat Assignment Probability LeetCode solution in C++

1
class Solution {
2
public:
3
double nthPersonGetsNthSeat(int n) {
4
if (n == 1) return (double)1;
5
return (double)1 / 2;
6
}
7
};

0

WPM •0 •0

100%

ACC •0 •0

0s

TIME •0