Advertisement
Guest User

Untitled

a guest
Feb 25th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. to_remove = Make an (empty) list of squares to not keep
  2. squares = Create a square for each point, with the point as its center
  3.  
  4. For each square in squares
  5. If the square has more than one point in it
  6. For each of the points in this square that aren't the center point
  7. temp_list = intersect(points_in_this_square, points_in_other_point's_square)
  8. If sort(temp_list) == sort(points_in_this_square)
  9. to_remove = append(to_remove, other_point)
  10.  
  11. squares = squares not in to_remove
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement