Pergunta de entrevista da empresa Everforth CyberCoders

Explain how to add a node on Heap tree.

Resposta da entrevista

Sigiloso

12 de jul. de 2014

Add the new node to the bottom of the heap tree. If the value is not greater than its parent, you are done. If it is greater, swap the position of the node and its parent. Repeat the process until the node value is no longer greater than its parent's value.

6