Solving the HackerRank CITY Query Exercise

Solving the HackerRank CITY Query Exercise

Have you ever come across a coding exercise that leaves you feeling unsure about your solution, even when it’s correct? That’s exactly what happened to me with a recent HackerRank challenge. The task was to query the list of CITY names starting with vowels (i.e., a, e, i, o, or u) from STATION, without duplicates. I did manage to get a correct answer, but it didn’t quite sit right with me. I couldn’t explain why, but it felt wrong.

So, I decided to share my experience and see how others would approach the problem. Maybe you’ve faced a similar situation before? How would you have solved this exercise? Share your thoughts and let’s learn from each other.

In the comments, I’ll post my solution, and I’d love to hear your feedback or alternative approaches. Sometimes, it takes a fresh perspective to make us feel more confident in our coding skills.

Leave a Comment

Your email address will not be published. Required fields are marked *