The interview lasted for 1hr and contained one (medium-hard) question:
Given a list of hotelId, parentHotelId and a score retrieve the top k root parentHotelIds with highest scores:
[{0, 1, 10}, {1, 2, 20}, {3, 4, 10}, {7, 8, 5}] K = 2
Result: [[2, 30], [4,10]]
The solution I gave was to create an Object to store scores and the ids, then use a Map<CustomObject, CustomObject> from parent to child. Then traverse the tree and propagate the sum of scores up to the root note.