Changed dependent ifs to if trees in hybrid heap-sort