Skip to content

Instantly share code, notes, and snippets.

@havenwood
Created August 6, 2019 23:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save havenwood/e194acecc6836ebfea8a105bcedd021c to your computer and use it in GitHub Desktop.
Save havenwood/e194acecc6836ebfea8a105bcedd021c to your computer and use it in GitHub Desktop.
def check(r1, r2, p1, p2)
return 0 if r1 <=> r2 != p1 <=> p2
return 1 if r1 != p1 || r2 != p2
2
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment