Available question text
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.
Related questions
Continue with questions that share topics or the same question type.
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 2106. Maximum Fruits Harvested After at Most K Steps
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source