Learnacy Lab
A heap keeps the smallest value at the root of a complete tree stored as an array: inserts bubble up, extract-min sifts down, and the parent of index i…