left and right to represent the sliding window's boundaries, and set them to 0.currentSum to keep track of the sum of running costs within the window.right pointer over the robots:
a. Add the current robot's running cost to currentSum.
b. Maintain the deque to always have the maximum charge time at the front.
c. Calculate the total cost for the current window.
d. If the total cost exceeds the budget, shrink the window from the left by incrementing left and adjust currentSum and deque accordingly.