Archives August 2018

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


Basics of Logarithms

Before we move to the time complexity of the next algorithm, I’ve decided to give it a break and write a short post about logarithms, they are crucial. I’ll be honest, and I’ll confess that I always had a hard time understanding the concept of logarithms. While working with time complexities of the algorithms, we

Read More


Time & Space Complexity – III

In the previous post I talked about time complexity of simple for loops. In the previous post, I talked about the time and space complexity of simple for loops. I hope you got the time and space complexity of the algorithm with 3 for loops as O(n^3) and O(n^2) respectively. Let’s discuss some more examples,

Read More


Undefined Vs Null

In JavaScript, both undefined and null come under primitive data types. But they are not as simple as a string, number, and boolean. A variable is said to be undefined when it has been declared (for future use) but has no value assigned to it. For example, Line 2 prints undefined in double quotes, i.e.

Read More


Data Types in Javascript

JavaScript is not strict when it comes to data types and use of variables if we are writing codes without using ‘use strict’. None of the code example in this post has been written with ‘use strict’ option. As a result, we can use a variable (without declaring it) and the JavaScript engine won’t have

Read More