Computational complexity of algorithms
In this section, we will learn about what algorithms are, the complexity of algorithms, and what they mean in terms of time and space and Big-O notation (compact notation for classifying the time and space needed for an algorithm). By the end of this section, you should have a good understanding of what algorithms are and their characteristics, such as complexity, and be able to determine the Big-O notation for the complexity of algorithms.
Algorithms are a step-by-step procedure/instruction to solve a problem or to obtain a desired output. They can be implemented in any programming language. Some of the important categories of algorithms from a data structure point of view are as follows:
- Search: Used to search for an item in a data structure
- Sort: Used to sort items in a required order
- Insert: Used to insert items into a data structure
- Update: Used to update an existing item in a data structure
- Delete: Used...