ex3 runtimes

0.0(0)
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/15

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

16 Terms

1
New cards

insertion sort

O(N²)

2
New cards

insertion sort (sorted)

O(N)

3
New cards

Simple Sort - lower bound (such as insertion sort, bubble sort, and selection sort)

Ί(N2)

4
New cards

Shell Sort - original sequence

Θ(N2)

5
New cards

Shell Sort- Hibbard’s sequence

Θ(N3/2)

6
New cards

Shell sort - Sedgewick’s sequence

(O(N4/3)

7
New cards

Shell Sort - lower bound

Ω(N²)

8
New cards

Shell Sort - upper bound

O(N²)

9
New cards

heap sort, merge sort, quicksort

O(N log N) on average, quicksort worst case O(N²)

10
New cards

quickselect

O(N), worst case O(N²)

11
New cards

bucket sort

O(M+N)

12
New cards

radix sort

O(N)

13
New cards

Union (Array), Find (Array)

union O(N), find O(1) constant. Opposite when tree

14
New cards

Union (Tree), Find (Tree)

union O(1) constant, find O(N). Opposite when array

15
New cards

Smart Union, Smart Find

log(N)

16
New cards

Union, Find - Path compression

O(mlog*N)