Tip 1 : Invest more time on DSA, follow love babbar sheet it would help a lot
Tip 2 : Have a rock solid resume, gives you control over the interview
Tip 3 : Work on your communication skills so you are able to convey your thoughts to interviewer conveniently
Tip 1 : Have an internship, gives you the edge
Tip 2 : Try to have a project using some latest technology or something related to development or open source



If the given array is [1, 3, 2], then you need to return [3, -1, -1]. Because for 1, 3 is the next greater element, for 3 it does not have any greater number to its right, and similarly for 2.



1. There are no self-loops(an edge connecting the vertex to itself) in the given graph.
2. There are no parallel edges i.e no two vertices are directly connected by more than 1 edge.
Input:
4 5
0 1 5
0 2 8
1 2 9
1 3 2
2 3 6

The source node is node 0.
The shortest distance from node 0 to node 0 is 0.
The shortest distance from node 0 to node 1 is 5. In the above figure, the green path represents this distance. The path goes from node 0->1, giving distance = 5.
The shortest distance from node 0 to node 2 is 8. In the above figure, the pink path represents this distance. The path goes from node 0->2, giving distance = 8.
The shortest distance from node 0 to node 3 is 7. In the above figure, the yellow path represents this distance. The path goes from node 0->1->3, giving distance = 7.
step 1: I explained the algorithm taking a sample graph
step 2: Explained what data structure is required and what would be the complexity
step3: Wrote the code for the same.
What are semaphores?
Implement binary mutex?
what is race condition?



a) push(int x) : 'x' has to be inserted in the priority queue. This has been implemented already
b) pop() : return the maximum element in the priority queue, if priority queue is empty then return '-1'.
We perform the following operations on an empty priority queue:
When operation push(5) is performed, we insert 1 in the priority queue.
When operation push(2) is performed, we insert 2 in the priority queue.
When operation pop() is performed, we remove the maximum element from the priority queue and print which is 5.
When operation push(3) is performed, we insert 1 in the priority queue.
When operation pop() is performed, we remove the maximum element from the priority queue and print which is 3.
step 1: I explained the algorithm taking a sample array
step 2: Explained min & max heap
step 3: Explained what data structure is required and what would be the complexity
step 4: Wrote the code for the same.
How do you describe yourself?
Name some qualities that defines you?
Why do you want join our company?

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