Tip 1 : I practiced a lot of problems related to Data structures on the Coding ninjas platform and other coding platforms.
Tip 2 : If you are stuck somewhere in a problem and want to see reference, first, try to understand the algorithm and then move on to code.
Tip 3 : Just see the algorithm that is how to approach first and don't try to understand from the code right off the bat, code has finer implementation variation that can be done on your own if you are clear with the algorithm. Also for big product companies, prepare enough problems of graphs and trees as these are the most important topics for interviews.
Tip 1 : Mention a good level of projects in your resume, and also give a brief detail about each and every project.
Tip 2 : Have at least 1 or 2 good projects from which you know everything involved in the project.
This round consist of coding as well as mcq questions



1. Left - (i, j-1)
2. Right - (i, j+1)
3. Up - (i-1, j)
4. Down - (i+1, j)



A subarray is a contiguous subset of an array.
The array may contain duplicate elements.
The given array follows 0-based indexing.
It is guaranteed that there exists at least one subarray of size K.



Corresponding to given min heap : [1,2,3,6,7,8]

It can be converted to the following max heap: [8,7,3,6,2,1]




It is guaranteed that there will be no two consecutive zeroes, and there will always be a zero at the beginning and end of the linked list.



For a (6 x 6) board, the numbers are written as follows:

You start from square 1 of the board (which is always in the last row and first column). On each square say 'X', you can throw a dice which can have six outcomes and you have total control over the outcome of dice throw and you want to find out the minimum number of throws required to reach the last cell.
Some of the squares contain Snakes and Ladders, and these are possibilities of a throw at square 'X':
You choose a destination square 'S' with number 'X+1', 'X+2', 'X+3', 'X+4', 'X+5', or 'X+6', provided this number is <= N*N.
If 'S' has a snake or ladder, you move to the destination of that snake or ladder. Otherwise, you move to S.
A board square on row 'i' and column 'j' has a "Snake or Ladder" if board[i][j] != -1. The destination of that snake or ladder is board[i][j].
You can only take a snake or ladder at most once per move: if the destination to a snake or ladder is the start of another snake or ladder, you do not continue moving - you have to ignore the snake or ladder present on that square.
For example, if the board is:
-1 1 -1
-1 -1 9
-1 4 -1
Let's say on the first move your destination square is 2 [at row 2, column 1], then you finish your first move at 4 [at row 1, column 2] because you do not continue moving to 9 [at row 0, column 0] by taking the ladder from 4.
A square can also have a Snake or Ladder which will end at the same cell.
For example, if the board is:
-1 3 -1
-1 5 -1
-1 -1 9
Here we can see Snake/Ladder on square 5 [at row 1, column 1] will end on the same square 5.

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