How would you go about finding the smallest element in a 2-element array? You'll probably find that a single if-else
is enough.
Now make the same thing for a 3-element array. Do you just add more conditionals? Or do you just write a generic algorithm that handles arrays of any size?
Your "sift-down" algorithm is done in two steps: find the smallest element, then swap it with the current element. You generalized the binary heap into a ternary heap by simply adding more tests, when you probably should have gone with the more general solution. What if you go to a 4-ary heap? Will you add even more if-else
tests?