Acorns interview question

Find the minimum depth of a binary tree. (follow up: maximum depth)

Interview Answer

Anonymous

27 Apr 2021

I used breadth first search to find the shallowest node without children, passing the node and its current depth as a tuple into a queue.