Tip 1 : Practice Leetcode medium questions(top ones from all the popular topics)
Tip 2 : Have good hold of System design questions and practice all the commonly asked ones.
Tip 1 : Keep it concise
Tip 2 : Make sure to include the keywords/tech stack that the particular opening is looking out for



1. If there is no possible path to change BEGIN to END then just return -1.
2. All the words have the same length and contain only lowercase english alphabets.
3. The beginning word i.e. BEGIN will always be different from the end word i.e. END (BEGIN != END).
Start from the given start word.
Push the word in the queue
Run a loop until the queue is empty
Traverse all words that adjacent (differ by one character) to it and push the word in a queue (for BFS)
Keep doing so until we find the target word or we have traversed all words.



A graph where all vertices are connected with each other has exactly one connected component, consisting of the whole graph. Such a graph with only one connected component is called a Strongly Connected Graph.
The problem can be easily solved by applying DFS() on each component. In each DFS() call, a component or a sub-graph is visited. We will call DFS on the next un-visited component. The number of calls to DFS() gives the number of connected components. BFS can also be used.


1. The grid has 0-based indexing.
2. A rotten orange can affect the adjacent oranges 4 directionally i.e. Up, Down, Left, Right.
Create a variable no = 2 and changed = false
Run a loop until there is no cell of the matrix which is changed in an iteration.
Run a nested loop and traverse the matrix. If the element of the matrix is equal to no then assign the adjacent elements to no + 1 if the adjacent element’s value is equal to 1, i.e. not rotten, and update changed to true.
Traverse the matrix and check if there is any cell which is 1. If 1 is present return -1
Else return no – 2
How to design Splitwise?
Tip 1 : Make sure you ask relevant questions
Tip 2 : Focus on design principles

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