Pregunta de entrevista de Booking.com

Easy/medium leetcode question with hashmaps