Tip 1 : Clean Resume
Tip 2 : Brush up core CSE subjects
Tip 3 : Good grasp of Data structure at least solve 500 leetcode easy-medium problem
Tip 1 : Good Internship
Tip 2 : Clean and to the point
This round Consist of 2 medium hard version problem and an amazon leadership problem



Conditions for valid parentheses:
1. All open brackets must be closed by the closing brackets.
2. Open brackets must be closed in the correct order.
()()()() is a valid parentheses.
)()()( is not a valid parentheses.
First, think out loud and always discuss the approach with the interviewer I solved using a stack



If a string has 'x' repeated 5 times, replace this "xxxxx" with "x5".
The string is compressed only when the repeated character count is more than 1.
Consecutive count of every character in the input string is less than or equal to 9. You are not required to print anything. It has already been taken care of. Just implement the given function and return the compressed string.
I used string inbuilt function quite easy
This round was held at 11 in the morning and interviewer was SDE-2 located in Hyderabad



The width of each bar is the same and is equal to 1.
Input: ‘n’ = 6, ‘arr’ = [3, 0, 0, 2, 0, 4].
Output: 10
Explanation: Refer to the image for better comprehension:

You don't need to print anything. It has already been taken care of. Just implement the given function.
I used two array to store next greater element and nest smaller element and subtractedit interviewer was impressed

Select any subarray of length at most 'N' - 1 and rearrange the elements in any order.
Let 'N' = 5, 'A' = [1, 2, 3, 5, 4].
We can apply the operation to the subarray from index 4 to 5 (1-based indexing).
So our answer is 1.

Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
How do you remove whitespace from the start of a string?