Round 1
Questions: Given a graph, some vertices are torch nodes and others are wire nodes. Torch nodes have a power value of 16, and wires have a power value of 0. If a torch node is directly connected to a wire node, the power of that wire becomes 15. Essentially, the power of wire nodes is calculated as max(0, 16 - distance from the closest torch node). Find the final power of all nodes in the graph and return the graph.
Candidate's Approach
This was an easy multisource BFS problem. I was able to solve it in 25 minutes with no follow-up questions.
Interviewer's Feedback
The interviewer grilled me over C++ concepts and Space Complexity when using different graph representations.
Round 2
Questions: Given a directed acyclic graph with vertices connected with weights (positive or negative), find the minimum path between a source and a destination.
Follow-Up Question:
Find the minimum average weight between the source and the destination. This was somewhat similar to a problem on AtCoder.
Candidate's Approach
There was a slight bug in my code, but with a small hint, I was able to correct it and received a borderline result.
Interviewer's Feedback
No feedback provided.
Round 3
Questions: Given a string of bracket sequences containing ‘(‘ and ‘)’. You can perform three types of operations:
- Add a new bracket
- Remove any bracket from the string
- Change any bracket ‘)’ to ‘(‘ or vice versa.
The cost of all these operations is 1. Note that if you add a new bracket and change a bracket, the cost of both operations is still 1. You have to convert the given bracket sequence into a balanced bracket sequence with minimum cost and return the final bracket sequence. If there are multiple solutions, return any of them.
Candidate's Approach
I solved the problem in 35 minutes and was left with 5 minutes remaining. No follow-up questions were asked.
Interviewer's Feedback
No feedback provided.
Round 4
Questions: Googliness. General Behavioural Questions.
Candidate's Approach
No approach provided.
Interviewer's Feedback
No feedback provided.
Overall
Got matched with Youtube Team in BLR Location
Finally got rejected by Hiring Committee