Tip 1: Practice DSA strongly (at least 300+ questions, mostly medium & some hard as well).
Tip 2: Always try to land upon the most optimal solution from time & space complexity.
Tip 3: In between practice, also participate in coding contests.
Tip 4: Add 2-3 technical projects to your resume to enhance it.
Tip 1: Have at least 2 projects on your resume.
Tip 2: Only mention the skills in which you are confident; otherwise, list them as elementary proficiency.
Walk-in round



As depicted in the photo below, the knight currently at (0, 0) can move to any of the 8 positions: (1, 2), (2, 1), (2, -1), (1, -2), (-1, -2), (-2, -1), (-2, 1), (-1, 2).

If X = 1 and Y = -1, then we need to find out the minimum number of steps to move the knight from (0, 0) to (1, -1).
We need at least 2 steps to move the knight to the desired position.
First move: (0, 0) -> (2, 1)
Second move: (2,1) -> (1, -1)
Here we can see that there are many ways, but we need at least 2 steps. Therefore we will return the value 2.
It is a simple DFS traversal problem.



The traversal should proceed from left to right according to the input adjacency list.
Adjacency list: { {1,2,3},{4}, {5}, {},{},{}}
The interpretation of this adjacency list is as follows:
Vertex 0 has directed edges towards vertices 1, 2, and 3.
Vertex 1 has a directed edge towards vertex 4.
Vertex 2 has a directed edge towards vertex 5.
Vertices 3, 4, and 5 have no outgoing edges.
We can also see this in the diagram below.
BFS traversal: 0 1 2 3 4 5

The interview was checking how the candidate is approaching the problem.
Asked to write the code on paper.
Solution - Just apply BFS approach
Write an optimal algorithm for Facebook friend suggestions. Write what data structure you will use to store the friends' information of all users.
I chose a graph as a data structure to store all the users & made an edge if the 2 users were friends.
Logically friend suggestions will be a list of friends of friends.
First, return the level 2 friends & so on.
HR round (Behavioural).

Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
What is the best case time complexity of Bubble Sort?