I had only one, 30 minutes interview. It started with OOPs, polymorphism, static functions etc. Then they proceeded to DSA question. They asked me only one question, I answered it too. But turns out they were not happy with me, 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 neighbours of the node are burnt too as the fire spreads in all directions (ie burning child and parent of that node). Each burning node will burn all its neighbors in next second.
Task: Find total time to burn the tree. I solved it using a hashmap.
The connection to children exists via nodes, all you need is a connection to the parent, for which I used a hashmap. PS:- I learnt this from Striver. He has video on this exact same question.
I solved it. explained my thought process, my intuitions, give pseudo code, give c++ code, yet didn't get selected.
They selected someone who doesn't even know basic stuff and was just lucky enough to have friends who told him what questions they were asked and he just vomited answers to those questions.