K Closest Points to the Origin

Talk it through out loud with your AI coach.

The problem

  • medium
  • Pro

Given a list of points on a flat plane and a number k, return the k points closest to the origin. Explain your approach and its cost.