Pergunta de entrevista da empresa Booking.com

90 mins. A spring boot hackerrank question. As soon as you log into the hackerrank test. You will get a GitHub URL. You can copy the URL and clone the repository in your local. You have to work on your local machine and keep pushing your commits to the repository. All the necessary POJOs, service implementation, and databases are in place I was asked to implement the following questions: 1. Implement a GET /hotel/{id} to retrieve a hotel by Id 2. Implement a DELETE /hotel/{id} to delete a hotel by Id. (It should not be actually deleted from the system but should be marked as 'deleted') 3. Search all the hotels closest to the city center. /search/{cityId}. The city object has latitude and longitude and the hotel object also has latitude and longitude. The distance between two can be calculated using the haversine formula, (The question says we can use the internet to calculate the haversine formula)

Resposta da entrevista

Sigiloso

12 de jan. de 2022

Exact same experience as you. I did solve the same question with required APIs, but got a negative response. May be they are looking for comments in all the methods that we type. But these were so simple APIs that I did not type any comments, I believe for simple method, the name of the method should convey the usage and this case the APIs were really self explanatory.

25