Yara Interview Question

Some general Min/Max algorigthm, Heap DS dependent problem