Tip 1 : Try to give each and every question there on leetcode and try to upsolve them as well.
Tip 2 : quality matters but quantity also matters, so try to solve as many questions as you can.
Tip 1 : you should have at least 2 projects done completely by yourself so that you can handle any query asked by interviewer.
Tip 2 : try to mention all your achievements related to competitive programming.
The round was totally based on data structure and algorithms.



For the given binary tree:

The Inorder traversal will be [5, 3, 2, 1, 7, 4, 6].
Do left recursion then push then Do right recursion



‘MEETINGS[]’ = {30, 15, 60}
Let us assume the meeting starts at 12:00 o’clock.
The first meeting takes 30 minutes so after the first meeting time is 12:30.
Then Ninja cannot attend the second meeting which is for 15 minutes because he needs 15 minutes break after every meeting.
After a 15 minutes break, he can attend the next meeting which is for 60 minutes.
So the total booked minutes for the meetings is 30 + 60 = 90.
Sort events increased by start time.
Priority queue pq keeps the current open events.
Iterate from the day 1 to day 100000,
Each day, we add new events starting on day d to the queue pq.
Also we remove the events that are already closed.
Then we greedily attend the event that ends soonest.
If we can attend a meeting, we increment the result res.
This round was again based on data structures and algorithms in which interviewer shares an hackerrank link with me and there he gives me two problems to solve. I don't remember the problems but one problem was easy and other was medium. I was able to do both the problems.



[1, 2, 3, 4] is a strictly increasing array, while [2, 1, 4, 3] is not.
This is a classic Dynamic Programming problem.
Let dp[i] is the longest increase subsequence of nums[0..i] which has nums[i] as the end element of the subsequence.



A substring is a contiguous segment of a string.
Initialize two variables, oddCount to store the number of characters with an odd count of occurrences and an unordered map ump to store the count of each character in the string.
Iterate through the string and for each character ch, increment the count of that character in the unordered map.
If the count of the current character ch is odd, increment oddCount. If the count is even, decrement oddCount.
If oddCount is greater than 1, return s.length() - oddCount + 1, which is the maximum length of a palindrome that can be formed by using all but one character with an odd count of occurrences.
If oddCount is not greater than 1, return s.length(), which is the length of the original string, as all characters can be used to form a palindrome.
This round was again based on dsa and problem solving.



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.
For each element in the array, we find the maximum level of water it can trap after the rain, which is equal to the minimum of maximum height of bars on both the sides minus its own height.



Let the array 'ARR' be [1, 2, 3] and 'B' = 5. Then all possible valid combinations are-
(1, 1, 1, 1, 1)
(1, 1, 1, 2)
(1, 1, 3)
(1, 2, 2)
(2, 3)
This was a problem where we have to explore all possibility, make each combination and if sum of a combination becomes equal to target sum then we have to store that possible combination in our answer array.
One more thing we have to notice here is that, for a particular element we have unlimited choice i.e we can choose a element as many times as we want.
But their is some restiction also on choosing a number.
See for every number in making our target sum, we have two possibility i.e
Whether to include that element in making our target sum.
Whether not to include that element in making our target sum.

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?