This is a tough binary heap implementation without an array. Because you have to hold all of the parent during insertion, and then perform the operation by pressing up and down. for example [parent_1, parent_2 ... parant_k] and then if parent_(k+1) < parant_k pushUpand change their right child and left child elements
user467871
source
share