Sub-array with maximum elements whose sum is under a limit
Filed under Veritas
The question
Given an array of integers and a number, find the sub-array with the maximum elements whose sum is less than or equal to the given number.
No write-up yet. Related questions below have one.
Related Veritas questions
Collected from public candidate posts and coding forums. Updated Nov 2026.