Pergunta de entrevista da empresa Google

Return k smallest element in a tree

Respostas da entrevista

Sigiloso

16 de jun. de 2016

DFS inorder return first k visited nodes (using auxiliary array)

1

Sigiloso

23 de abr. de 2015

using a rather complicated recursion.

Sigiloso

27 de jun. de 2015

look number of values on the left of the current node, if adding this node we get k - this is the node we are looking for.

Sigiloso

17 de dez. de 2015

Probably a heap is the right way to go