Available question text
People stand in a line from 1 to n and pass a pillow one step per second, reversing direction at the ends; given n and time, determine which index holds the pillow after time seconds. Recognize the motion is periodic with period 2*(n-1) and can be solved by mapping time modulo that period to a forward-or-reflected position.
Related questions
Continue with questions that share topics or the same question type.
- Longest Team Pass Streak
Coding
- Maximum Average Pass Ratio
Coding
- Team Dominance by Pass Success
Coding
- The coding questions were ~LC hard with follow-ups. Interviewers were great, collaborative, helpful. It was extremely helpful to practice "hard" level questions while reasoning out loud. The bar to pass seems high at the moment
Coding
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 2582. Pass the Pillow
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source