Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- func sort(a map[int]int) {
- sorting := true
- for sorting {
- sorting = false
- for i := 0; i < len(a) - 1; i++ {
- if a[i] > a[i+1] {
- a[i], a[i+1] = a[i+1], a[i]
- sorting = true
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement