Expedia Group interview question

Describe your approach in the hackerrank