Available question text
Find the maximum length of a contiguous subarray (consecutive robots) such that max(chargeTimes in the window) + window_length * sum(runningCosts in the window) <= budget. The core challenge is maintaining the window's running sum and its maximum efficiently (e.g., with a monotonic deque and two-pointers) to test feasibility while expanding/shrinking the window.
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 2398. Maximum Number of Robots Within Budget
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source