posts
Data Structures and Algorithms Go
Jan 29, 2025
| 8 min read
|
Chris Zietlow

Recovering Software Engineer, Philomath, Shitty Photographer, Technologist, believes the oxford comma isn't optional.
Algorithm
Simple Sorts
Selection Sort
Sort a list of []Type by searching for the smallest (or largest) element of the array, removing the found element from the list, and copying it to a new list.
Time Complexity: $O(n^2)$
Example
1func selectionSort(list []int) []int {
2 newList := []int{}
3 for range list {
4 …