Created
May 3, 2016 13:57
-
-
Save dansanabria/220f435587a1dbc7be4df6e5f2eef51c to your computer and use it in GitHub Desktop.
This file contains 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 characters
def whoIsNext(names, r) | |
r.times { names.concat([names[0], names[0]]).shift } | |
return names[0] | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment