Tip 1 : Even if you are stuck in the problem, just give a try. The interviewer will help you definitely for sure.
Tip 2 : Prepare Data Structures and Algorithms well. They mostly check our Problem Solving ability to find the solutions for the real world problems.
Tip 3 : Be enough confident, don't be nervous. Maintain atleast 2 projects in your resume
Tip 1 : Mention atleast 2 projects.
Tip 2 : Mention your skills in which you are perfect.
Tip 3 : It should not be too long or too short


1. The grid has 0-based indexing.
2. A rotten orange can affect the adjacent oranges 4 directionally i.e. Up, Down, Left, Right.
Use BFS
Let's assume there are two functions one whose complexity was (N + M) and the other whose complexity was N*logM we need to tell which has lower complexity and also in what scenarios the function having lower complexity will take more time.
Tip 1 : Need to have a good knowledge of Asymptotic notations and time complexity.



Solved using DFS



1. Coordinates of the cells are given in 0-based indexing.
2. You can move in 4 directions (Up, Down, Left, Right) from a cell.
3. The length of the path is the number of 1s lying in the path.
4. The source cell is always filled with 1.
1 0 1
1 1 1
1 1 1
For the given binary matrix and source cell(0,0) and destination cell(0,2). Few valid paths consisting of only 1s are
X 0 X X 0 X
X X X X 1 X
1 1 1 X X X
The length of the shortest path is 5.


Subsequences of string "abc" are: ""(empty string), a, b, c, ab, bc, ac, abc.
I started solving this problem with a brute force recursion approach.
Step 1 : When either of the strings were empty, the LCS is 0.
Step 2 : Else, if the current character of the strings matched, I checked for the previous prefix of the whole string, and added 1 to the answer.
Step 3 : If the characters didn’t match, I took the maximum of LCS(string1_length - 1, string2_length) and LCS(string1_length, string2_length - 1).



The solution is quite simple if the height of wall is less than or equal to x, only one jump in that wall is required else we can calculate it by height of wall-(climb up-climb down) and get the jumps required.

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