Skip to content

Instantly share code, notes, and snippets.

@shuklaneerajdev
Last active January 18, 2021 04:47
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 shuklaneerajdev/8f1244c0221473f96942c0d3371027f3 to your computer and use it in GitHub Desktop.
Save shuklaneerajdev/8f1244c0221473f96942c0d3371027f3 to your computer and use it in GitHub Desktop.
def reverse(input)
rev = ""
i = input.length-1
while i>=0 do
rev = rev+input[i]
i=i-1
end
puts rev
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment