1/4
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
What is a linear search?
A linear search checks each item in a list one at a time until it finds the target or reaches the end of the list.
What is a binary search?
A binary search repeatedly divides a sorted list in half, deciding whether to continue the search in the left or right half, until the item is found or the list cannot be divided further.
Give 1 advantage and disadvantage of a binary search
A binary search is faster but the list needs to be sorted
What is a bubble sort?
A bubble sort compares adjacent items in a list and swaps them if they are in the wrong order. This is repeated until the list is sorted.
What is a merge sort?
A merge sort uses a divide-and-conquer approach. It splits the list into halves, recursively sorts each half, and then merges the sorted halves back together.