1/3
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
Bubble sort
Compares pairs of items
First 2 items in a list are compared
If item1 > item2 then swap
Else do nothing repeat with next 2 items
Quick Sort
Choose an item to be the pivot (usually last or first)
Move all items that are smaller than the pivot to the left and those larger to the right
Repeat as other items as pivots
Linear Search
Involves checking each item in a list of data on at a time to see if it’s the right item.
If the list isn’t in order, linear search is the way.
Binary Search
Dividing the list into half each time
If midpoint is less than desired item then focus on items after the midpoint
If midpoint is more than desired item then focus on items before the midpoint.
If there is an even number of items select the middle left item
Keep repeating until you find the answer
Can only be used when list is in order