Booking.com interview question

Techniques question is leetcode count duplicate elements