Skip to content

Instantly share code, notes, and snippets.

@dansanabria
Created May 3, 2016 13:57
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 dansanabria/220f435587a1dbc7be4df6e5f2eef51c to your computer and use it in GitHub Desktop.
Save dansanabria/220f435587a1dbc7be4df6e5f2eef51c to your computer and use it in GitHub Desktop.
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