Community

Start a Thread


Notifications
Subscribe You’re not receiving notifications from this thread.

Get Binary Tree Leaves (Main Thread)

Here is the interview question prompt, presented for reference.

Suppose we're given a binary tree, one with several leaves like such:

We're asked to get all the current leaf values, then delete the leaves. Then we repeat-- we again get the leaf values, and then delete-- proceeding until we're done with the root node.

How could we implement this in an efficient manner?

You can see the full challenge with visuals at this link.

Challenges • Asked over 2 years ago by Jake from AlgoDaily

Jake from AlgoDaily Commented on Aug 08, 2022:

This is the main discussion thread generated for Get Binary Tree Leaves (Main Thread).