Tip 1 : Do not rush into things. Learning takes time. Focus should be on the concepts and not just on leaving topics half-prepared. Devote 70% of both time and effort to DSA. I solved a total of around 500 questions on sites like GFG and Leetcode. Do not repeat similar questions just to increase the count of the number of questions
Tip 2 : Competitive Programming is a bonus and not a necessity, rather focus on core DSA based problems before trying CP. Do not pursue CP if you do not like it. Devote that extra time to core CS subjects and aptitude preparation.
Tip 3 : Projects play an important role too, do no ignore them. Try to get your hands dirty with a little bit of every field i.e., frontend, backend, and database.
Tip 1 : Have some projects on resume.
Tip 2 : Do not put false things on resume.



If the given array is: [2 6 7 7 10] and K = 2. We need to remove A[0] = 2 and A[4] = 10, then the resultant array would become [6 7 7], where the difference between adjacent pairs are {1, 0}. Thus our answer would be 1. You can see that there would not be any better answer than 1 for this array
You are given a non-decreasing array and an integer K. You need to remove exactly K integers from the given array such that the maximum difference between adjacent elements is minimum.



A 'deep copy' of a linked list means we do not copy the references of the nodes of the original linked list, rather for each node in the original linked list, a new node is created.
Step 1 : Assumed that there is no random pointer present, hence I was able to easily come with the solution to clone a normal linked list.
Step 2 : I was then asked can I do it in constant space, I was able to come up with the logic but wasn't able to code it.



1. If 'X' is not found in the array, return 0.
2. The given array is sorted in non-decreasing order.
Step 1 : Provided the linear search solution then I was asked what if the array is sorted?
Step 2 : Since the array is sorted used lower bound and upper bound to find the frequency of the given element



For the given binary tree: [1, 2, 3, -1, -1, 4, 5, -1, -1, -1, -1]
Start Node: 3
1
/ \
2 3
/ \
4 5
Output: 2
Explanation :
In the zeroth minute, Node 3 will start to burn.
After one minute, Nodes (1, 4, 5) that are adjacent to 3 will burn completely.
After two minutes, the only remaining Node 2 will be burnt and there will be no nodes remaining in the binary tree.
So, the whole tree will burn in 2 minutes.
You have been given a binary tree of 'N' unique nodes and a Start node from where the tree will start to burn. Given that the Start node will always exist in the tree, your task is to print the time (in minutes) that it will take to burn the whole tree.
It is given that it takes 1 minute for the fire to travel from the burning node to its adjacent node and burn down the adjacent node.

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?