Optimizing the Algorithm
Learn about optimizing the running time of an algorithm.
Ways to decide a prime number
In this lesson, we’ll discuss algorithms and time complexity. First, we’ll look at a few code snippets and the time it takes to run the program. Moreover, we’ll also learn about the underlying logic and algorithm of the code.
By now, we’re familiar with the terms “algorithm” and “time complexity.” We know that our algorithm should be efficient enough to reduce the time to run the code. We should also remember that problems can have many solutions; we just need to find the best algorithm.
Get hands-on with 1400+ tech skills courses.