Tip 1 : Practice Leetcode/coding ninjas as much as possible
Tip 2 : Go through Past Interview Experiences
Tip 3 : Focus on your resume
Tip 1 : Be precise and focus on Quantitative Data
Tip 2 : Mention all the major projects which shows how much you have contributed towards your firm.


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.
1. Traversed every array element and find the highest bars on the left and right sides. Then take the smaller of two and difference between the smaller height and the height of the current element is the amount of water that can be stored in this array element.
2. Interviewer asked to optimize the solution as it involves lot of traversing.
3. New approach: pre-compute the highest bar on the left and right of every bar in linear time. Then use these pre-computed values to find the amount of water in every array element.



A -> 1
B -> 2
C -> 3
...
Z -> 26
AA -> 27
AB -> 28
...


1. This is the DFS/BFS related problem. solved using DFS at first.
2. Interviewer was happy with the solution and asked further questions like what if surrounding is land rather than water. How will the solution change.



Design Book My Show
Tip 1 : understand the requirements and ask questions to check what exactly one is looking out for.
Tip 2 : Follow the design patterns as much as you can.
Tip 3 : Follow the oops concepts



Can you solve it in O(N+M) time?
If ‘N’ = 6, ‘A’ = {1, 2, 0, 3, 4, 5}, ‘M’ = 7 and ‘B’ = {3, 5, 0, 2, 1, 6, 4}.
Then, we will return {6, 6, 2, 5, -1, 6} because:
For i = 0, A[i] = 1 and the first element greater than 1 that lies to the right of it in array ‘B’ is 6.
For i = 1, A[i] = 2 and the first element greater than 2 that lies to the right of it in array ‘B’ is 6.
For i = 2, A[i] = 0 and the first element greater than 0 that lies to the right of it in array ‘B’ is 2.
For i = 3, A[i] = 3 and the first element greater than 3 that lies to the right of it in array ‘B’ is 5.
For i = 4, A[i] = 4 and there is no greater element to the right of 4 in array ‘B’.
For i = 5, A[i] = 5 and the first element greater than 5 that lies to the right of it in array ‘B’ is 6.
1. traverse the array backwards till the curr number is smaller than the previous one. let's say index i.
2. reverse the array starting i till end.
Given a Javascript object with the auth credentials. convert that object into the desired format and extract credentials out of it.
1. Iterate the Js object and get the username and password.
2. convert into the desired format.

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