Daily iOS
CS fundamentals and algorithmsGoogle

K nearest places

You have tens of thousands of places with an id and coordinates (latitude, longitude). Given the user's current location, design a function that finds the 10 nearest places and returns their center coordinate. Which algorithm and data structure do you use, and what's the complexity?

Submit