-
-
Save d3vw/ff6fac3d693c288ce5ed05d0816c728d 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
| func bb_sort(arr []int) []int { | |
| for i:=range arr { | |
| for j:=len(arr)-1);j>i;j-- { | |
| if arr[j-1]>arr[j] { | |
| arr[j], arr[j-1] = arr[j-1], arr[i] | |
| } | |
| } | |
| } | |
| return arr | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment