Tip 1 : Practice more problem solving questions
Tip 2 : understand the comcepts in depth
Tip 3 : try to work on onw or two handson project to get more experience in that stack.
Tip 1 : Have some projects on resume.
Tip 2: Do not put false things on resume.



I solve the problem using BFS.



In the given linked list, there is a cycle, hence we return true.

You have given a Singly Linked List of integers, determine if it forms a cycle or not.
A cycle occurs when a node's next points back to a previous node in the list. The linked list is no longer linear with a beginning and end—instead, it cycles through a loop of nodes.



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.
This problem is an alteration to shortest path problem. For solving this I followed the approach of constfucting the adjacency matrix.
Then any shortest path algorithm can be applied. I used Floyd Warshal algorithm to solve it.



We can solve this problem with the help of backtracking. The idea is to start from the first row and place Queen in each square of the first row and recursively explore the remaining rows to check if they lead to the solution or not. If the current configuration doesn’t result in a solution, backtrack. Before exploring any square, ignore the square if two queens threaten each other.

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?