Created
          March 30, 2019 16:58 
        
      - 
      
 - 
        
Save gilo/38f83aa5bcfa9f4e87b414dbcd981444 to your computer and use it in GitHub Desktop.  
Revisions
- 
        
Gil Ochayon created this gist
Mar 30, 2019 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,8 @@ // Assume we have a slice of points, where type Point struct {X, Y int} // Write a function sortPoints(points []*Point, origin *Point) []*Point that will return a sorted slice of the points // according to their distance from origin. The original points parameter should not be affected. You should use the sort // package and not implement your own sorting. func sortPoints(points []*Point, origin *Point) []*Point { }