I had only one, 30-minute interview. It started with OOP concepts like polymorphism, static functions, etc. Then they proceeded to a DSA question.
They asked me only one question, and I answered it. However, it turns out they were not happy with my performance, and I wasn't selected.
The question was: Given a binary tree and a node, you burn that node at time t = 0. At time t = 1, all the neighbors of the node are burnt too, as the fire spreads in all directions (i.e., burning the child and parent of that node). Each burning node will burn all its neighbors in the next second.
Task: Find the total time to burn the tree.
I solved it using a hashmap. The connection to children exists via nodes. All I needed was a connection to the parent, for which I used a hashmap. PS: I learned this from Striver; he has a video on this exact same question.
I solved it, explained my thought process, my intuitions, and provided pseudocode and C++ code, yet I didn't get selected.
They selected someone who doesn't even know basic concepts and was just lucky enough to have friends who told him what questions they were asked, and he just recited answers to those questions.