02_bubble/

directory
v0.0.0-...-cf576ff Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 29, 2020 License: Apache-2.0

README

Lab 2 - Bubble sort

  • Create an executable go program in directory 02_bubble/USERNAME
  • Write a function that returns a sorted copy of int slice s using bubble sort:
func bubble(s []int) []int

Call fmt.Println(bubble([]int{3, 2, 1, 5})) in main to print:

[1 2 3 5]
  • Bonus points: implement Insertion sort
  • Extra bonus points: implement an O(n log(n)) sorting algorithm

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL