Software Engineer Intern Interview Questions

9,360 software engineer intern interview questions shared by candidates

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.
avatar

Software Development Engineer (SDE) Intern

Interviewed at Goldman Sachs

3.7
Aug 21, 2025

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.

Viewing 6521 - 6530 interview questions

Glassdoor has 9,360 interview questions and reports from Software engineer intern interviews. Prepare for your interview. Get hired. Love your job.