FlashKeepers

Computer Science · College · College and University

Data Structures, Unit 9: Sorting Algorithms

Data Structures, unit: Sorting Algorithms. Core concepts, terminology, and worked-example cues a college student meets for this unit, building on prior units without repeating them. Front: a term, concept, or short problem cue. Back: the definition, explanation, or answer.

About this set

37 basic cards for College Computer Science. Set 9 of 10 in Data Structures. It opens with "What is a sorting algorithm?" and "What is the time complexity of bubble sort in the average and worst case?". Study it alongside the other College sets below.

37 cards · basic cards · AI-written, checked twice. Edit anything.

Study this set free Look inside first Get FlashKeepers for iPhone

Opens in your browser, no account. Get the iPhone and iPad app · Android app

What is a sorting algorithm?
Show answerAn algorithm that arranges elements of a list into a specific order
What is the time complexity of bubble sort in the average and worst case?
Show answerO(n^2)
How does bubble sort work?
Show answerRepeatedly swapping adjacent elements that are out of order, until the list is sorted
What is the time complexity of selection sort?
Show answerO(n^2)
How does selection sort work?
Show answerRepeatedly finding the minimum element from the unsorted portion and moving it to the front
What is the time complexity of insertion sort in the average and worst case?
Show answerO(n^2)
How does insertion sort work?
Show answerBuilding a sorted portion one element at a time, inserting each new element into its correct place
When is insertion sort particularly efficient?
Show answerOn small or nearly-sorted datasets
What is merge sort?
Show answerA divide-and-conquer sorting algorithm that splits the list, sorts each half, and merges them
What is the time complexity of merge sort?
Show answerO(n log n) in all cases
What is the space complexity of merge sort?
Show answerO(n), due to the auxiliary arrays used during merging
What is quicksort?
Show answerA divide-and-conquer sorting algorithm that partitions elements around a pivot
What is the average-case time complexity of quicksort?
Show answerO(n log n)
What is the worst-case time complexity of quicksort?
Show answerO(n^2), typically when the pivot choice is poor
What is a pivot in quicksort?
Show answerAn element chosen to partition the array into smaller and larger elements

22 more cards in the app

Study this set free