Tip 1 : Graph should be on your tips.
Tip 2 : while explaining the solution to interviewer, dont just hop onto the most optimal solution. Start with the brute force one, give the cons of brute force solution, and then go step by step till you reach the optimal solution.
Tip 3 : Improve on your communication skills as well.
Tip 1 : Mention only what is required for your profile, for e.g. do not stress too much on your co curricular stuff. Rather, try explaining more of your technical stuff that is relevant for your job.
Tip 2 : keep it limited to 1 page. And make sure its a pdf and not an image.



If the matrix is
0 2 4 1
4 8 3 7
2 3 6 2
9 7 8 3
1 5 9 4
Then answer is 47. As, Alice will collect coins 0+8+3+9+1 = 21 coins. Bob will collect coins 1+7+6+8+4 = 26 coins. Total coins is 21+26 = 47 coins.
Step 1. I first sorted the array.
Step 2. Then I assigned initial coins to bob so that he gets minimum.
Step 3. Inside the loop, i give myself the first element and alice the second element, and increase counter of loop to 2 for every iteration.



Round 1 :A stream of “visited URLs” are being sent to your program throughout the day. At any given time, list out the Top 10 most visited URLs.
I started thinking about heaps, tried to solve with max heap initially, but with the help of interviewer, could solve it with min heap as well.



The distance is calculated as |i1 – i2| + |j1 – j2|, where i1, j1 are the coordinates of the current cell and i2, j2 are the coordinates of the nearest cell having value 1.
You can only move in four directions which are : Up, Down, Left and Right.
If N = 3, M = 4
and mat[ ][ ] = { 0, 0, 0, 1,
0, 0, 1, 1,
0, 1, 1, 0 }
then the output matrix will be
3 2 1 0
2 1 0 0
1 0 0 1
I first tried to understand the problem by understanding it on notepad.
I tried to solve it using BFS, and was able to solve the problem within time and interviewer was happy with my solution.



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).
I first gave interviewer a brute force solution, which was partially correct.
Then interviewer game me some hints after which I could solve the problem and interviewer was happy with the solution.
It was value based round. Interviewer was some manager at dunzo, situation based questions can be expected in this round.
Situation based question, previous experience questions, questions that shows our commitment to work, and how hard working we are.

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