title: JAVA 2D Find the K closest points to the origin in 2D plane
body: <p>Find the K closest points to the origin in 2D plane, given an array containing N points. You can assume K is much smaller than N and N is very large.</p>
  
  <p>This is what i have so far:</p>
  
  <pre><code>   public class OriginQuestion {
  
       public static class Point {
  
       public double x;
  
      public double y;
  
   } 
    public static Point[] closestk( Point  myList[], int k ) {}
      for(int i=0;i&lt;myList.length;i++){
  
      }
  
    }
  </code></pre>
  
  <p>Help appreciated</p>