Booking.com Interview Question for Software Engineer / Developers
- 1of 1 vote
Problem statement- PraTrick April 10, 2017 in India
Given a set of hotels and its guests reviews, sort the hotels based on a list of words specified by a user. The criteria to sort the hotels should be how many times the words specified by the user is mentioned in the hotel reviews.
The first line contains a space-separated set of words which we want to find mentions in the hotel reviews.
The second line contains one integer M, which is the number of reviews.
This is followed by M+M lines, which alternates an hotel ID and a review belonging to that hotel.
A list of hotel IDs sorted, in descending order, by how many mentions they have of the words specified in the input. If the count is same, sort according to the hotel IDs.
| Report Duplicate | Flag | PURGE
Booking.com Software Engineer / Developer
Interview Type: Written Test
Open Chat in New Window