Halloween Sale
Unlock all premium questions for over 30% off
Longest Subarray Within Limit
Medium
Question
The input is an array a holding positive integers, together with a limit k. Find how long the longest subarray of a can be while its sum stays at or below k. Should all candidates exceed k, the result is 0.
...
Asked at:Goldman Sachs
More Goldman Sachs interview questions
- Largest Tree Root IDmedium
- Tree Diagonal Traversalmedium
- Stack and Queue Implementationsmedium
- Parallel Task Schedulerhard
- Fire Spread in Binary Treemedium
- Best Average Scoreeasy
- Autocorrect Anagram Prototypeeasy
- Triangle Point Containmentmedium
OfferRetriever
Master technical interviews with real questions from top companies. Build your confidence and career.
LEGAL
© 2026 Purple Business Holdings LLC. All rights reserved. See Terms of Service.