Fetching data...
This may take a moment
Back
2666. Minimum Time to Eat All Grains
Hard
Array
Two Pointers
Binary Search
Sorting
Solve on LeetCode
View Solutions
Description
Hints
Hint 1
Binary search the answer.
Hint 2
To check if an answer is possible, for the ith hen check how far right it can go after ensuring that it eats the leftmost uneaten grain.
Hint 3
If the last grain is eaten in this process, the answer is possible.
Similar Questions
Kth Smallest Number in Multiplication Table
Hard
Statistics
Acceptance
40.0%
Submissions
5,196
Accepted
2,079