Created
May 6, 2019 17:52
-
-
Save gcasa/61cd810d8fdcba621c52a67d624373a1 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# you can write to stdout for debugging purposes, e.g. | |
# puts "this is a debug message" | |
def solution(a, k) | |
# write your code in Ruby 2.2 | |
r = a.reverse | |
rot = r.rotate(k) | |
result = rot.reverse | |
result | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment