Empresa engajada
Return k smallest element in a tree
Sigiloso
DFS inorder return first k visited nodes (using auxiliary array)
using a rather complicated recursion.
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.
Probably a heap is the right way to go
Fique por dentro de todas as oportunidades e dicas internas seguindo as empresas de seus sonhos.
Comece a buscar vagas para receber atualizações e recomendações personalizadas.