1227. Airplane Seat Assignment Probability ¶ Time: Space: C++JavaPython 1 2 3 4 5 6class Solution { public: double nthPersonGetsNthSeat(int n) { return n == 1 ? 1 : 0.5; } }; 1 2 3 4 5class Solution { public double nthPersonGetsNthSeat(int n) { return n == 1 ? 1 : 0.5; } } 1 2 3class Solution: def nthPersonGetsNthSeat(self, n: int) -> float: return 1 if n == 1 else 0.5