A simple method of sorting a set of elements into a sorted list is to use selection sort. Selection sort involves searching through a whole list, selecting the smallest element it finds and swapping that element to the front of the list.
Another algorithm used to sort sets of elements is quicksort, referred to as a divide and conquer algorithm. This is because quicksort is an example of a recursive sort, which means that it partitions the items that need to be sorted into smaller and smaller sets and passes those sets back into itself; thus, it ‘divides’ the array into smaller and smaller pieces until it can ‘conquer’ the array and sort it.
A linear search is the simplest type of search. This search involves checking every element in the list, from first to last, when searching for a particular element.
A binary search is more efficient than a linear search. Binary search is similar to quicksort in that it is also a recursive algorithm, but instead of being divide and conquer, it is a decrease and conquer algorithm, as it is able to discard half of the data being searched through at each iteration of the algorithm.