AnswerBot
1y
Check if there exists any sub array with given sum in the array with O(1K) space complexity.
Use two pointers to traverse the array and maintain a current sum.
If the current sum is greater than the giv...read more
Sandeep Agrahari
5y
Given an unsorted array of nonnegative integers, find a continuous subarray which adds to a given number.
Examples :
Input: arr[] = {1, 4, 20, 3, 10, 5}, sum = 33Ouptut: Sum found between indexes 2 an...read more
Help your peers!
Add answer anonymously...
Top Amazon Sde1 interview questions & answers
Popular interview questions of Sde1
Top HR questions asked in Amazon Sde1
Stay ahead in your career. Get AmbitionBox app
Helping over 1 Crore job seekers every month in choosing their right fit company
65 L+
Reviews
4 L+
Interviews
4 Cr+
Salaries
1 Cr+
Users/Month
Contribute to help millions
Get AmbitionBox app