Booking.com SDE2 | Interview Experience | Bengaluru
I applied from Booking.com careers page around Jan. I received the recruiter call around May. By Feb, I had already switched but I gave this a try so that it will be a practice for me and also I could get the questions and share it with this community 😊
HackerRank OA - Machine Coding
Background :
Spring Boot App template given.
Data populated in h2 database.
All the JPA entities (Hotel, City) and their corresponding repository classes were present.
Question
- Build basic CRUD apis for Hotel entity in Booking.com
- Write an api to return 3 closest hotels from a given city
- Write UTs if required.
(Note: Latitude and Longitude info for City and Hotel will be present in their corresponding tables. The question suggested to use Haversine formula to calculate the distance and also could google search for the formula)
Round 1 - System Design
Design Rating and Review System for Booking.com with following features :
- Search and filter hotels on ratings
- Rate a hotel
- Add a review
Round 2 - DSA
Find all possible ways to spend the total budget.
Constraints:
- Tourist should spend 'numDaysInEachCity' consecutive days in a city
- Expenditure should not exceed 'totalBudget'
Input
{
"numDaysInEachCity": 2,
"totalBudget": 390,
"pricesPerCity": {
"Paris": [10, 20, 50, 80, 100, 20], // city - list of prices on each day
"LA" : [90, 10, 40, 90, 12, 11]
"Amsterdam": [70, 20, 10, 30, 20, 80]
}
}Output
Return list of all possible expenditures
Example
One possible permuation is
- 1st and 2nd day in Paris - 10 + 20 = 30
- 3rd and 4th day in LA - 40 + 90 = 130
- 5th and 6th day in Amsterdam - 20 + 80 = 100
Total expenditure = 30 + 130 + 100 = 260
260 < 'totalBudget' => include in output list
Verdict
Ghosted. I didn't receive any feedback. I didn't solve round 2. So, I assume, I was rejected.


