Algorithms Flashcards
What search types are there?
Linear
Binary
What is an algorithm?
Are sets of instructions that can be followed to perform a task.
What is Linear search?
Linear search involves methodically searching one location after another until the searched for value is found.
What is binary search?
Binary search works by dividing the list in two each time until we find the item being searched for. For binary search to work, the list has to be in order. This consists of LB, MP and UP.
What are sorting algorithms?
Sorting algorithms are used to put data (usually in an array or list) in order. This may be numbers, strings, records or objects.
What different type of sorts are there?
Bubble
Insertion
What is bubble sort?
When you swap two values to make them in order. For eg B A C, the first two letters will be swapped to make the list in order to ABC. This is easy but an inefficient way of doing things.
What is insertion sort?
This consists of 2 lists (sorted and unsorted). The first item will be classed as sorted but when moved to next item there will two now in the sorted group. They will compare the values and continue to grow the sorted group.