Booking.com interview question

Hackerrank Q(s): 1. Heap data structure