Tip 1 : Practice 250+ standard quality questions.
Tip 2 : Do some good real-life projects in Front-end or Backend Development
Tip 3 : Try to find an internship that will not only enhance your development skills but also increase your resume selection chances.
Tip 1 : Add quality projects (2 will be sufficient)
Tip 2 : Add your coding profile links.
The online test was for 2 hrs in which 5 coding questions were asked. 3 questions were pretty easy and 2 were of medium difficulty level. I was able to solve all 5 questions.
In the below map of Ninjaland let say you want to go from S=1 to T=8, the shortest path is (1, 3, 8). You can also go from S=1 to T=8 via (1, 2, 5, 8) or (1, 4, 6, 7, 8) but these paths are not shortest.
Start BFS traversal from source vertex.
While doing BFS, store the shortest distance to each of the other nodes and also maintain a parent vector for each of the nodes.
Make the parent of the source node as “-1”. For each node, it will store all the parents for which it has the shortest distance from the source node.
Recover all the paths using the parent array. At any instant, we will push one vertex in the path array and then call for all its parents.
If we encounter “-1” in the above steps, then it means a path has been found and can be stored in the paths array.
It started with the introduction and then we had a discussion on the projects I had made. He asked for several Backend and Database concepts like locking in DB, sessions, etc as I had mentioned backend internship in my resume. It took around half an hour.
Then he gave me a coding question based on the graph
1. Surrounded regions shouldn’t be on the border, which means that any 'O' on the border of the matrix is not flipped to 'X'.
2. Any ‘O’ or group of connected ‘O’ are said to be surrounded by ‘X’ when all cells touching the boundary of the group of ‘O’ must contain ‘X’.
I first took some time to think of a solution then told him the DFS as well as BFS approach. Then he made me run through several test cases on the pseudo-code. Once he was satisfied with the approach then I coded it on the editor and ran several test cases which he gave.
Finally, He asked me about the Time-Complexity and Space-Complexity of the code.
Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
Which array operation has O(n) worst-case time complexity?