Question d’entretien chez Google

Return k smallest element in a tree

Réponses aux questions d'entretien

Utilisateur anonyme

16 juin 2016

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

1

Utilisateur anonyme

23 avr. 2015

using a rather complicated recursion.

Utilisateur anonyme

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

Utilisateur anonyme

17 déc. 2015

Probably a heap is the right way to go