Booking.com Interview Question

leetcode coding question to finish in 90 minutes