Merge sort practice problem

Merge sort is a recursive algorithm to arrange the elements of a data structure, such as an array or list, in increasing or decreasing order. The algorithm partitions the portion of the array into 2 unsorted halves, sorts each half, then merges the 2 sorted halves into 1 sorted whole.

Sequential search practice problem

Sequential search is an algorithm in which a data structure, such as an array or a list, not known to be sorted is searched element by element from beginning to end for a specific value.

Selection sort practice problem

Selection sort is an algorithm to arrange the elements of a data structure, such as an array or list, in increasing or decreasing order. The algorithm partitions the array into sorted and unsorted parts and repeatedly finds the minimum (or maximum) in the unsorted part and swaps it with the last element of the sorted ...

Insertion sort practice problem

Insertion sort is an algorithm to arrange the elements of a data structure, such as an array or list, in increasing or decreasing order. The algorithm partitions the array into sorted and unsorted parts and repeatedly inserts the first element of the unsorted part into its correct position in the sorted part.

Binary search practice problem

Binary search is an algorithm in which a data structure, such as an array or a list, known to be in sorted order is searched efficiently for a specific value. Since the data structure is known to be sorted the middle element is checked against the value sought. If the value matches, the index of ...