In mathematics and computer science, an algorithm is a finite sequence of
well-defined, computer-implementable instructions, typically to
solve a class of specific problems or to perform a computation.
Insertion Sort Algorithm
A simple sorting algorithm that builds the final sorted array one element at a time by repeatedly shifting elements to the right and inserting the next element in the correct position.
Ternary Search Algorithm
A search algorithm that splits the array into three parts and performs the search in the subarray with the highest probability of finding the target value. It has a time complexity of O(log3 n).