Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 1894. Find the Student that Will Replace the Chalk
Given an array of chalk usage per student cycled repeatedly and k chalk pieces, find the index of the first student whose required chalk is strictly greater than the remaining pieces at their turn. Key insight: subtract full rounds by k %= sum(chalk), then find the first prefix sum > k (via linear scan or binary search on prefix sums).
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.