algorithms Flashcards
Define linear search
A sequence that checks every item in a list 1 by 1 until it finds the desired item.
Define bubble sort
Bubble sort makes multiple passes through a list. It compares items and changes those that are out of order. Each pass through the list places the next largest value in its proper place.
Define binary search
A sequence that finds the desired item of a list according to the midpoints.
Define insertion sort
A more efficient version of bubble sort. Each pass would insert each number into its correct place.
How are numbers sorted in insertion sort?
Compares 1st 2 items and inserts the necessary item into its complete correct position rather than swapping them. Has 2 lists, unsorted and sorted.