Skip to content

Instantly share code, notes, and snippets.

@vincecima
Created January 9, 2019 02:21
Show Gist options
  • Save vincecima/bf503ddaff327c52be1f66ddeb51b5d8 to your computer and use it in GitHub Desktop.
Save vincecima/bf503ddaff327c52be1f66ddeb51b5d8 to your computer and use it in GitHub Desktop.
Code Example
def method(a)
n=a.length
for i in 0...n-1
for j in 0...n-i-1
if a[j]>a[j+1]
temp=a[j]
a[j]=a[j+1]
a[j+1]=temp
end
end
end
return a
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment