Quick Sort

Table of Contents

Problem

Ordered lists

// Sorted lists, in ascending and descending order
l1 := []int{0, 1, 2, 3, 4, 5, 6, 7, 8, 9}
l2 := []int{9, 8, 7, 6, 5, 4, 3, 2, 1, 0}

// Random list
r := rand.New(rand.NewSource(0))
l3 := r.Perm(10)

fmt.Println(l1)
fmt.Println(l2)
fmt.Println(l3)

Sorting

Overview of algorithms

Plan

Quick Sort

Why Quick Sort?
Quick, divide and conquer
Low additional memory
How to Quick Sort
Partition
Sort
Recurr

Process

Partition

Sort

Recurr

Past

Created: 2024-05-30 Thu 23:00