Every problem has solutions but the most important thing is to find the solution that best fits that scenario. So as we take a dig inside the algorithms and techniques we will investigate how we can analyse the complexity and conclude the correct optimized solution.
Let us begin with a simple example and try to find the time and complexity.
Example : We need the sum of n natural numbers starting from ‘a’ and ending at ‘b’. Read More »