Pergunta de entrevista da empresa Acorns

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

Resposta da entrevista

Sigiloso

27 de abr. de 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.