Last active
June 19, 2019 15:48
-
-
Save mredig/cc0f5ac43770da6563b9a0b67b021a43 to your computer and use it in GitHub Desktop.
takes any positive integer as an argument and returns the next highest and next lowest integers having the same number of 1s as the passed argument's binary representation
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
edited to make generic for all int variants