CS130-lecture-20200928

Dev environment #

JDK 11 JUnit 5 Module with all docs for setup

Filenames: assignment1_ZedChance.zip

Quicksort exercise solutions #

IMAGE

Quicksort cont. #

IMAGE IMAGE IMAGE IMAGE IMAGE IMAGE IMAGE IMAGE IMAGE IMAGE IMAGE IMAGE IMAGE IMAGE

Runningtime is O(n)

IMAGE

Priority queues #

IMAGE IMAGE IMAGE IMAGE IMAGE IMAGE

a is complete b is complete c is incomplete d is not a binary tree e is incomplete f is complete

a is a height of 0 b-d is a height of 1 e-f is a height of 2

IMAGE

first tree is neither second tree is max heap third tree is min heap

IMAGE