Tag algorithm analysis

Asymptotic Notations – II

In this post, we will see the remaining two asymptotic notations. The algorithm we were discussing was the linear search. We had calculated the estimated time complexity as 2n + 3. To read the previous post, click here. Big-Omega – The Lower Bound function f (n) belongs to big-omega of g (n) if there exist

Read More


Asymptotic Notations – I

In this post, I will discuss the time functions in asymptotic notations. You probably have heard about asymptotic notations. They are the Big-Oh, Big-Omega, and Theta functions. I had read in details about them when I was in doing my B. Tech [I couldn’t recollect which semester, and that is a pity]. It is going

Read More


Why do Exponential Functions Hurt?

Before we move further, let us recap the types of time complexity functions we have encountered till now. We will also see that algorithms with exponential functions are evil. Here is the list of functions we have seen till now. The sequence of these functions is the same as written above. That is, a quadratic

Read More


Time & Space Complexity – II

Click here to go to the previous post. While calculating the space complexity of the algorithm, we established that one variable would take one unit of space. Space Complexity of Algorithm 2 Click here to view Algorithm 2. The easiest way to calculate the space complexity is to list out the variables and add 1

Read More


Time & Space Complexity – I

In simple words, time complexity is the amount of an algorithm takes to execute, and the space complexity is the memory used. In general, if you have ever studied the time and space complexity of algorithms, the one thing that we remember is: for loops are bad. In this first part of the series of

Read More