Intern Engineering Interview Questions

56,422 intern engineering interview questions shared by candidates

Write an algorithm (Python) to traverse a binary tree, but the traversal was in a zig-zag order. So you go down 1 layer, move across the layer horizontally, and down on the other side, printing values along the way. Not how a binary tree is normally traversed.
avatar

Software Engineering Intern

Interviewed at Glean (CA)

3.8
Apr 6, 2024

Write an algorithm (Python) to traverse a binary tree, but the traversal was in a zig-zag order. So you go down 1 layer, move across the layer horizontally, and down on the other side, printing values along the way. Not how a binary tree is normally traversed.

Viewing 1721 - 1730 interview questions

See Interview Questions for Similar Jobs

Glassdoor has 56,422 interview questions and reports from Intern engineering interviews. Prepare for your interview. Get hired. Love your job.