Tip 1 : Solve Leetcode/SDE sheet provided by Striver most problems came from the Sheet itself
Tip 2 : Try to solve the 1st of the 2 questions as fast as possible as the time limit is 1 hour
Tip 3 : Make sure you have projects and have done some internship's so that they can actually ask questions from the resume.
Tip 1 : Have some projects on your resume
Tip 2 : It helps if you had even some small internship experience in the past



1. You can not slant the container i.e. the height of the water is equal to the minimum height of the two lines which define the container.
2. Do not print anything, you just need to return the area of the container with maximum water.

For the above Diagram, the first red marked line is formed between coordinates (2,0) and (2,10), and the second red-marked line is formed between coordinates (5,0) and (5,9). The area of water contained between these two lines is (height* width) = (5-2)* 9 = 27, which is the maximum area contained between any two lines present on the plane. So in this case, we will return 3* 9=27.



Consider a country having 4 states numbered from 1 to 4. These 4 states are connected by 5 bidirectional roads given as :
1 --- 2 with cost = 8
2 --- 3 with cost = 6
3 --- 4 with cost = 5
1 --- 4 with cost = 2
1 --- 3 with cost = 4
The map of the country can be represented as:

Now, the best way to choose 3 roads is:

The cost of travelling from any state to all other states is 2 + 4 + 6 i.e. 12.
Face to Face DSA online round conducted on Amazon Chime platform.






Face to Face DSA Round where I was asked 2 coding questions



Each pair should be sorted i.e the first value should be less than or equals to the second value.
Return the list of pairs sorted in non-decreasing order of their first value. In case if two pairs have the same first value, the pair with a smaller second value should come first.
1. First I gave the O(n^2) approach , then he asked to optimize it
2. Then I gave the map solution and he was satisfied with the approach



1. If 'X' is not found in the array, return 0.
2. The given array is sorted in non-decreasing order.
1. Gave a map based solution asked me to optimize space and time
2. Gave a linear solution with a counter with no extra space
3. Gave a binary search based solution with upper bound and lower bound. The difference between upper and lower bound will give the frequency.
Note :The interviewer asked me to implement upper and lower bound from scratch and with little to no time left I was unable to implement the upper and lower bound

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?