Home
Browse
Create
Search
Log in
Sign up
Upgrade to remove ads
Only $2.99/month
Sorting Algorithm Facts
STUDY
Flashcards
Learn
Write
Spell
Test
PLAY
Match
Gravity
stuff we have to know about the sorting algorithms for the AP test
Terms in this set (4)
Selection Sort
1. if array has n elements, it is sorted after n - 1 passes
2. after k passes, the first k elements are sorted
Insertion Sort
1. if array has n elements, it is sorted after n - 1 passes
2. after k passes, a[0] - a[k] are sorted with respect to each other, but not necessarily in their final positions
3. worst case: if array is already sorted in reverse order
4. best case: if array is already sorted in increasing order
Merge Sort
1. no best or worst cases because isn't affected by initial ordering
2. major disadvantage is that it uses a temporary array
Insertion Sort
screw this. it's an optional topic
OTHER SETS BY THIS CREATOR
German Vocab Einführung B
198 terms
San Manuel Bueno, Martir vocab
33 terms
Valenti Sonnet Terms
9 terms
El Sur vocabulario
31 terms
OTHER QUIZLET SETS
CS final 2019, it be like that sometimes
36 terms
CS125 Final Exam
27 terms
CS 310 Exam Two (Sorting, Binary Trees and HashTab…
62 terms
UML Computing II Exam 3
22 terms