Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 1227. Airplane Seat Assignment Probability
Given n passengers where the first picks a random seat and each subsequent passenger takes their own seat if available or otherwise chooses uniformly among remaining seats, compute the probability the nth passenger ends up in their assigned seat — a probability that follows a simple recurrence and equals 1 for n=1 and 1/2 for all n ≥ 2.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.