DEV Community

Cover image for What is Big O Notation in Algorithm
He Codes IT
He Codes IT

Posted on

What is Big O Notation in Algorithm

Big O notation is a specific notation that indicates the speed of an algorithm. When you use others’ algorithms in your project it is necessary to calculate Big O notation. It will help you to know how fast or slow it will work in your case. To know more about Big O notation visit HERE

Algorithm run-time at different rates
Alex is working on a SpaceX search algorithm. When a rocket is poised to arrive on the Moon, his algorithm will kick in and assist in determining where to land. The Algorithm he has to use must be fast and correct and he has two choices between simple search and binary search algorithm.
Binary search is more efficient. but on other hand, Simple Search is simple to write and lowers the risk of flaws.
Note: Alex just has 10 seconds to figure out and Alex also wants no programming flaws.
Alex chooses to time both methods with a list of 100 elements to be extra cautious.
Time each Search takes
To know about how Alex Solves the problem visit https://hecodesit.com/what-is-big-o-notation-in-algorithm/

Top comments (0)