Skip to content

Instantly share code, notes, and snippets.

@manojnaidu619
Created July 8, 2019 09:13
Show Gist options
  • Save manojnaidu619/b655de95ea5da86f376933b7973fb33b to your computer and use it in GitHub Desktop.
Save manojnaidu619/b655de95ea5da86f376933b7973fb33b to your computer and use it in GitHub Desktop.
Leetcode Solution for "Rotate String" in Ruby
def rotate_string(a, b)
return false if a!=b && a.length != b.length
a = a*3
return true if a.include?(b)
return false
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment