Given an array, Find out maximum length of subarray where max of subarray <= 2*min of subarray
AnswerBot
1y
Find maximum length of subarray where max <= 2*min.
Iterate through array and keep track of max and min values.
Update max length when condition is met.
Time complexity: O(n)
Help your peers!
Add answer anonymously...
Top Goldman Sachs Software Engineer interview questions & answers
Popular interview questions of Software Engineer
Top HR questions asked in Goldman Sachs Software Engineer
>
Goldman Sachs Software Engineer Interview Questions
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