COP 3502 (Computer Science 1) - Data Structures and Sorting Runtime

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/50

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.

51 Terms

1
New cards

What is the best-case run-time for Selection Sort?

O(n^2)

2
New cards

What is the average-case run-time for Selection Sort?

O(n^2)

3
New cards

What is the worst-case run-time for Selection Sort?

O(n^2)

4
New cards

Is Selection Sort stable?

Unstable

5
New cards

What is the space complexity of Selection Sort?

O(1)

6
New cards

What is the best-case run-time for Bubble Sort?

O(n)

7
New cards

What is the average-case run-time for Bubble Sort?

O(n^2)

8
New cards

What is the worst-case run-time for Bubble Sort?

O(n^2)

9
New cards

Is Bubble Sort stable?

Stable

10
New cards

What is the space complexity of Bubble Sort?

O(1)

11
New cards

What is the best-case run-time for Insertion Sort?

O(n)

12
New cards

What is the average-case run-time for Insertion Sort?

O(n^2)

13
New cards

What is the worst-case run-time for Insertion Sort?

O(n^2)

14
New cards

Is Insertion Sort stable?

Stable

15
New cards

What is the space complexity of Insertion Sort?

O(1)

16
New cards

What is the best-case run-time for Merge Sort?

O(n log n)

17
New cards

What is the average-case run-time for Merge Sort?

O(n log n)

18
New cards

What is the worst-case run-time for Merge Sort?

O(n log n)

19
New cards

Is Merge Sort stable?

Stable

20
New cards

What is the space complexity of Merge Sort?

O(n)

21
New cards

What is the best-case run-time for Quick Sort?

O(n log n)

22
New cards

What is the average-case run-time for Quick Sort?

O(n log n)

23
New cards

What is the worst-case run-time for Quick Sort?

O(n^2)

24
New cards

Is Quick Sort stable?

Unstable

25
New cards

What is the space complexity of Quick Sort?

O(log n)

26
New cards

What is the best-case run-time for Heapsort?

O(n log n)

27
New cards

What is the average-case run-time for Heapsort?

O(n log n)

28
New cards

What is the worst-case run-time for Heapsort?

O(n log n)

29
New cards

Is Heapsort stable?

Unstable

30
New cards

What is the space complexity of Heapsort?

O(1)

31
New cards

Trie Insert

O(k)

32
New cards

Trie Search

O(k)

33
New cards

Trie Delete

O(k)

34
New cards

AVL Tree Insert

O(log n)

35
New cards

AVL Tree Search

O(log n)

36
New cards

AVL Tree Delete

O(log n)

37
New cards

Binary Heap Insert

O(log n)

38
New cards

Binary Heap Search

O(n)

39
New cards

Binary Heap Delete

O(log n)

40
New cards

BST (Unbalanced) Insert (avg)

O(log n)

41
New cards

BST (Unbalanced) Insert (worst)

O(n)

42
New cards

BST (Unbalanced) Search (avg)

O(log n)

43
New cards

BST (Unbalanced) Search (worst)

O(n)

44
New cards

BST (Unbalanced) Delete (avg)

O(n)

45
New cards

BST (Unbalanced) Delete (worst)

O(n)

46
New cards

Hash Table Insert (avg)

O(1)

47
New cards

Hash Table Insert (worst)

O(n)

48
New cards

Hash Table Search (avg)

O(1)

49
New cards

Hash Table Search (worst)

O(n)

50
New cards

Hash Table Delete (avg)

O(1)

51
New cards

Hash Table Delete (worst)

O(n)