Domanda di colloquio di Google

Return k smallest element in a tree

Risposte di colloquio

Anonimo

16 giu 2016

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

1

Anonimo

23 apr 2015

using a rather complicated recursion.

Anonimo

27 giu 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.

Anonimo

17 dic 2015

Probably a heap is the right way to go