Skip to content

Instantly share code, notes, and snippets.

@Piyush-Chaudhary
Created December 16, 2022 08:05
Show Gist options
  • Save Piyush-Chaudhary/9083302c1addcf42b35ea59bd15f2265 to your computer and use it in GitHub Desktop.
Save Piyush-Chaudhary/9083302c1addcf42b35ea59bd15f2265 to your computer and use it in GitHub Desktop.
def rev_str(a)
rev = ''
for i in 1..a.length
puts a[i]
rev += a[a.length - i]
end
puts rev
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment