concept duplicate in category algorithms

This is an excerpt from Manning's book Algorithms and Data Structures in Action.
If we go back to our task management example, we can see how insert works on a ternary max-heap. Suppose we have the initial state shown in figure 2.9.A, describing the heap right after a call to insert(“Add exception for Superbowl”, 9.5) to add a particularly urgent task that marketing is pushing to have fixed by the need of the day (and yes, they do cheat using fractional numbers for priority! But that’s probably not the first time you see someone changing requirements after you pulled up a lot of work, is it?). After executing line #2 in listing 2.6, in fact, the list would be in this intermediate state (where heap properties are still violated.
Line #3 is then executed to reinstate heap property number 3, as we have seen in section 2.6.2, and the final result is shown in figure 2.9.B; notice the order in which the children of the root appear in the array: siblings are not ordered, and in fact a heap doesn’t keep a total ordering on its elements, like a BST would.
The best part is that we have already written almost all the code the need to implement this new data structure: we can internally use a treap (listing 3.9) and all its API methods will be just wrappers for treap’s methods, except for insert, that’s the only one for which we need to write an extra line of code.
Listing 10.5 The searchParentLeaf method
function searchParentLeaf(node, target) #1 if node.leaf then #2 return node else child ← node.findClosestChild(target) #3 return searchParentLeaf(child, target) #4