Tip 1: It is essential to practice coding consistently because it enables you to solve interview questions in the stipulated time. But before this, it is essential to have a clear understanding of all the data structures so that they can be easily implemented as and when required to solve a problem. It is also mandatory to clearly understand algorithms' time and space complexities because this is what you are judged upon in actual interviews: good intuition and an excellent approach to solving a problem help to crack the interview of such companies.
Tip 2: They do not judge you upon the number of internships you have done or the number of projects you have made. A single,good-quality project is enough if you have in-depth knowledge. What matters to them is how efficient a learner you are, how good your problem-solving skill is, and how confident you are with your answers.
Tip 3: Practise topic-wise questions, participate in lots of coding contests, and watch lots of YouTube solutions even after you can solve a question because you may find a different approach that is more efficient than yours, and watching video solutions is always a better option than just reading the solution, as it gives a clear and deeper understanding of the logics. Also, pray hard along with your preparation.
Tip 1 : Keep your resume short and clear. Mention your projects and internships with a brief description and year of completion. Mention coding languages are known to you, or other technical skills that you are good at. Do not mention anything that you are not good at. Highlight the topics that you are really good at.
Tip 2 : Be very honest and figure out only those things in your resume that you really know. Anything extra or unknown may have a negative impact upon your interview if asked by the interviewer.



The leaderboard scores are in descending order.
The game scores are given in ascending order.
This problem was of easy level and I could easily come up with a solution after identifying a relation between the rank and index of the element.




All the different rows are merged into a single row.
Step 1: I first traversed the linked list and on find a child pointer, descended down the list but forgot to keep track of the next pointers of such nodes.
Step 2: It dawned upon me that I need a container to keep hold of all next-pointers, and Stack could be used for this.
Step 3: Then I gave a solution using stack and also flattening the linked-list in O(n) time and the interviewer was happy with me.



1. A binary tree is a tree in which each node has at most two children.
2. The given tree will be non-empty.
3. The given tree can have multiple nodes with the same value.
4. If there are no nodes in the tree which are at distance = K from the given node, return an empty list.
5. You can return the list of values of valid nodes in any order. For example if the valid nodes have values 1,2,3, then you can return {1,2,3} or {3,1,2} etc.

Consider this tree above. The target node is 5 and K = 3. The nodes at distance 1 from node 5 are {2}, nodes at distance 2 from node 5 are {1, 4} and nodes at distance 3 from node 5 are {6, 3}.
Tip 1:We can solve this problem using breadth first search. Main thing to observe in this problem is that if we find two marked nodes which are at largest distance from each other considering all pairs of marked nodes then if a node is at a distance less than K from both of these two nodes then it will be at a distance less than K from all the marked nodes because these two nodes represents the extreme limit of all marked nodes, if a node lies in this limit then it will be at a distance less than K from all marked nodes otherwise not.
As in above example, node-1 and node-4 are most distant marked node so nodes which are at distance less than 3 from these two nodes will also be at distance less than 3 from node 2 also. Now first distant marked node we can get by doing a bfs from any random node, second distant marked node we can get by doing another bfs from marked node we just found from the first bfs and in this bfs we can also found distance of all nodes from first distant marked node and to find distance of all nodes from second distant marked node we will do one more bfs, so after doing these three bfs we can get distance of all nodes from two extreme marked nodes which can be compared with K to know which nodes fall in K-distance range from all marked nodes.

If N = 4 and the numbers on the top sides are: { 1, 2, 3, 2 } and the numbers on the bottom sides are: { 2, 4, 2, 2}
Then the minimum number of flips required is equal to 1.
We can flip the 2nd card, the top sides now become: { 1, 4, 3, 2 } and the bottom sides are: { 2, 2, 2, 2}. This results in getting the same numbers on the bottom side.



The same letter cell should not be used more than once.
For a given word “design” and the given 2D board
[[q’, ‘v’, ‘m’, ‘h’],
[‘d’, ‘e’, ‘s’, ‘i’],
[‘d’, ‘g’, ‘f’, ‘g’],
[‘e’, ‘c’, ‘p’, ‘n’]]
The word design can be formed by sequentially adjacent cells as shown by the highlighted color in the 2nd row and last column.

I sat with a pen and paper and used the provided test-case , which helped me to make a tree like structure , which had to be explored until its depth.This is where I realized that Depth First Search could be used to solve the problem.

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