Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 2106. Maximum Fruits Harvested After at Most K Steps
Given sorted fruit positions with amounts, find the maximum total fruits collectible starting at startPos with at most k steps, where you may walk left or right and can turn at most once; the core challenge is selecting the best contiguous interval of positions reachable within k (accounting for turn costs). This is typically solved by scanning intervals and using prefix sums with two-pointer/sliding-window logic to test reachability efficiently.
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.