Sorting Algorithms Flashcards

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

1/10

flashcard set

Earn XP

Description and Tags

Flashcards for reviewing sorting algorithms: Merge Sort and Quick Sort.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

11 Terms

1
New cards

Divide and Conquer Paradigm

Decompose a problem into simpler sub-problems of the same type, solve recursively, and combine the solutions.

2
New cards

Merge Sort - Split Step

Split the input array into two equal halves.

3
New cards

Merge Sort - Solve Step

Recursively sort the two subarrays independently.

4
New cards

Merge Sort - Combine Step

Combine the two sorted subarrays by merging to get an overall sorted array.

5
New cards

Quick Sort - Partition Step

Partition the input array according to a pivot.

6
New cards

Quick Sort - Solve Step

Recursively sort the two subarrays independently.

7
New cards

Quick Sort - Combine Step

Combine the two sorted subarrays by simple merging to get an overall sorted array.

8
New cards

Merge Sort - Worst-case Time Complexity

O(n log n)

9
New cards

Quick Sort - Worst-case Time Complexity

O(n^2)

10
New cards

Partition (in Quick Sort)

Splits an array into two subarrays, one with elements smaller than the pivot and one with elements greater than the pivot.

11
New cards

Efficient sorting algorithms based on divide-and-conquer

Merge sort, quick sort