Tip 1: Don’t panic.
Tip 2: Listen to the question carefully.
Tip 3: If you have any doubts about the question, ask the interviewer.
Tip 1: Write only the truth on your resume.
Tip 2: Go through your resume once before the interview.


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.

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