Google Amazon Facebook Question | Subarray with given sum |#100DaysOfCode | code io English

preview_player
Показать описание
Subarray with given sum
Given an unsorted array A of size N that contains only non-negative integers, find a continuous sub-array which adds to a given number S.

In case of multiple subarrays, return the subarray which comes first on moving from left to right.

Follow me on Social Media
Рекомендации по теме
Комментарии
Автор

its not working for n=4 s=0 and input 1, 2, 3, 4

tracer