Skip to content

Instantly share code, notes, and snippets.

@jmcarthur
Created February 6, 2011 01:02
Show Gist options
  • Save jmcarthur/812989 to your computer and use it in GitHub Desktop.
Save jmcarthur/812989 to your computer and use it in GitHub Desktop.
1. Map each ant to the number of ants it's fighting.
2. For each number, keep it only if all of its opposing neighbors are larger.
Example:
A A A -
A B C D
A1 A2 A3 --
A1 B3 C2 D1
A - - -
A - - D
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment