Tip 1: Spend as much time as possible on DSA.
Tip 2: Try to target real-life problems, not just those limited to computers.
Tip 3: Focus on and practice presenting your thoughts clearly.
Tip 1: Create a portfolio website showcasing all your projects.
Tip 2: Focus on demonstrating that you work on real-life problems.



1. If the ith building has a height greater than or equal to the next i.e (i+1)th building then he simply jumps to the next building.
2. Otherwise he uses either {‘HEIGHTS[i+1] -‘HEIGHTS[i]} bricks or just 1 ladder to climb up to the next building.



1. There are no 2 adjacent elements having same value (as mentioned in the constraints).
2. Do not print anything, just return the index of the peak element (0 - indexed).
3. 'True'/'False' will be printed depending on whether your answer is correct or not.
Input: 'arr' = [1, 8, 1, 5, 3]
Output: 3
Explanation: There are two possible answers. Both 8 and 5 are peak elements, so the correct answers are their positions, 1 and 3.



For the trees given below:-

The given trees are identical as:-
1. The number of nodes in both trees is the same.
2. The number of edges in both trees is the same.
3. The data for root for both the trees is the same i.e 5.
4. The data of root -> left (root’s left child) for both the trees is the same i.e 2.
5. The data of root -> right (root’s right child) for both the trees is the same i.e 3.
6. The data of root -> right -> left ( left child of root’s right child) for both the trees is the same i.e 6.
7. Nodes with data 2 and 6 are the leaf nodes for both the binary trees.
So the interviewer gave me a really interesting real-world simulation problem.
They said:
"Imagine a situation where you're designing a parking lot system. It's a single-lane parking area — think of it like a stack: the first car to enter is at the bottom, and the last car to enter is at the top. Now, cars can arrive and depart at any time, but here's the catch — if a car that's not on the top wants to leave, you need to temporarily remove the cars above it, let the target car exit, and then put the others back in the same order. Also, if the parking lot is full, incoming cars should wait outside in a queue. Your task is to simulate this system using appropriate data structures."
They asked me to implement three operations:
arrive(plate_number): When a car arrives, either park it (if space is available) or add it to the waiting queue.
depart(plate_number): When a car wants to leave, remove it from the parking lot or the queue. If it's in the lot but not on top, temporarily move the cars above it.
status(): Print the list of currently parked cars and the waiting queue.
So basically, I had to figure out how to use:
a stack for the parking lot,
a queue for the waiting line, and
possibly a hash map to keep track of each car’s position for faster lookup.

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