Sorting algorithms are a set of methods used to arrange elements in a specific order within a collection of data. The order can be ascending or descending, depending on the desired outcome.
There are many different types of sorting algorithm, including:
Bubble Sort
Selection Sort
Insertion Sort
Merge Sort
Quick Sort
Sorting
Search Algorithms
Search algorithms are used to locate specific data within a collection.
For example if you search for a name in a phone book on your phone. The two common search algorithms are:
linear search - useful on any list
binary search - only used on sorted list
Search algorithm
Compression Algorithms
Compression algorithms reduce the size of data for efficient storage and transmission. Most images are compressed so that they take up less space on your phone and they can be sent quicker to friends and family.
Examples include:
Huffman Coding
Run-Length Encoding
Divide and Conquer Algorithms
Divide and conquer algorithms break down complex problems into simpler sub-problems, solve them, and combine results.
Most divide and conquer a programming technique known as recursion, where the function repeated calls itself, dividing up the problem into smaller and smaller parts. Examples include:
Merge Sort
Quick Sort
Binary Search
A divide and conquer algorithm is an algorithm that breaks a problem into smaller sub-problems that are then solved.
Encryption Algorithms
Encryption algorithms are used to secure data by converting it into a secure form.
Historical methods:
Caesar Cipher
Pigpen.
Rail fence
Modern encryption techniques:
AES
RSA
Diffy-Hellman
Graph Algorithms
These algorithms are designed to analyze and traverse graphs (collections of nodes connected by edges).
A common application of graph algorithms is GPS navigation and route finding, for instance when you ask Google Maps for directions.Types of algorithmExamples include: