Daily challenge for 2026-03-31
455. Longest Budget Friendly Trip
You are planning a trip and have a list of daily costs and a maximum budget. Find the maximum number of consecutive days you can travel such that the total cost does not exceed your budget.
Example:Input: costs = [1, 2, 3, 4], budget = 5Output: 2
Explanation: The longest contiguous subarrays with a sum <= 5 are [1, 2] and [2, 3], both of length 2.
Run this challenge interactively in Python or JavaScript when the app loads.