Tip 1: Mention some good projects on your resume.
Tip 2: Be confident.
Tip 3: Be good with computer science basics and data structures and algorithms.
Tip 1: Highlight good projects.
Tip 2: Having some achievements is a plus.




1. There will be only lower case letters.
2. There will not be any special characters or capital letters in the input string.
3. There will be no spaces in the string.



Corresponding to given min heap : [1,2,3,6,7,8]

It can be converted to the following max heap: [8,7,3,6,2,1]

I simply used the concept of building a heap in the given array, which had an O(n) time complexity, and the interviewer was satisfied with my approach.



You can’t sell without buying first.
For the given array [ 2, 100, 150, 120],
The maximum profit can be achieved by buying the stock at minute 0 when its price is Rs. 2 and selling it at minute 2 when its price is Rs. 150.
So, the output will be 148.



|1-4|=3
|2-4|=2
|3-4|=1
|6-4|=2
|7-4|=3
And more

Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
What is recursion?