Morgan Stanley OA SDE Intern / Full time
Anonymous User
8894

There were 3 section
1st section -----> aptitude 10 questions 20 min(questions were doable)
2nd section -----> debugging questions 7 questions 20 min(questions were easy)
3rd section -----> 3 coding questions 60 min…
find the longest valid parentheses substring. Ex - )()()((() ans = 4 [()()]

https://leetcode.com/problems/longest-valid-parentheses/

given an array of integers, you are required to delete the element which is greater than it’s immediate left element. Return in how many operation this process will get stop.
Ex - 4 8 11 9 12 7
In 1st operation - delete 8, 11, 12 as they are greater then its left element
now arr becomes -- 4 9 7
In 2nd operation - delete 9 only
now arr become - 4 7
In 3rd operation - delete 7
arr becomes 4;

so after 3rd operation the process stops, so answer is 3 in this case.

https://leetcode.com/problems/minimum-number-of-refueling-stops/
exact same concept but statement was completely different.

Comments (10)