4.2.1 Flashcards
(4 cards)
1
Q
What is Sequential Search (Linear Search)?
A
Go through each item one by one until you find the target or reach the end.
π Simple, but slow for large lists.
2
Q
What is Binary Search?
A
Repeatedly divide a sorted list in half to find the target.
β‘ Much faster, but only works on sorted lists.
3
Q
What is Bubble Sort?
A
Compare and swap adjacent elements until the largest βbubblesβ to the end.
π Repeats until the list is sorted.
4
Q
What is Selection Sort?
A
Find the smallest element and move it to the front. Repeat for the rest.
β
Builds the sorted list step by step.