Tip 1: Never leave any topic from any chapter/subject.
Tip 2: Learn to explain your thoughts well.
Tip 3: Learn from previous experiences, interviews, and problems asked.
Tip 4: Include at least four projects in your resume.
Tip 1: Include at least four projects on your resume.
Tip 2: Do not write false information. You will always get caught. Be genuine.
This round was taken by a very polite interviewer. He asked some good questions on DSA concepts like the implementation difference between stack and queue and some concepts of pointers. Then he asked 2 DSA questions.



Suppose given input is "abacb", then the length of the longest substring without repeating characters will be 3 ("acb").
Maintain an Unordered Set to keep track of the maximum non-repeating char substring (Instead of the standard LPS array of KMP). Whenever we find a repeating char, then we clear the Set and reset len to zero. Rest everything is almost similar to KMP.



The given linked list is 1 -> 2 -> 3 -> 4-> NULL. Then the reverse linked list is 4 -> 3 -> 2 -> 1 -> NULL and the head of the reversed linked list will be 4.
Can you solve this problem in O(N) time and O(1) space complexity?
initialize three pointers prev as NULL, curr as head, and next as NULL.
Iterate through the linked list. In a loop, do the following:
Before changing the next of curr, store the next node
next = curr -> next
Now update the next pointer of curr to the prev
curr -> next = prev
Update prev as curr and curr as next
prev = curr
curr = next
This round was intended to assess my projects and technical stack knowledge. After discussing these, the interviewer inquired about my previous internship experience and the work I had done there. Additionally, he posed a challenging question related to Data Structures and Algorithms.



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.
Find the total number of blocks, i.e., the sum of the heights array, num_blocks
Find the maximum height, max_height
Store total water in a variable, total = 0
Keep two pointers, left = 0 and right = N -1, to store the leftmost and the rightmost boundaries for each unit of height
For each height, i from 1 to max_height, do the following
Find the leftmost and the rightmost boundary for the current height.
As mentioned earlier we can consider all the blocks in between these to have at least i unit of water.
Add this amount of water to the total trapped water.
After the iteration, subtract num_blocks from the total as we have considered them as water height during calculation.

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