Space complexity

This complexity is related to space (memory) needs in the main memory for the data used to implement the algorithm for solving any problem. That means if there n data items used in an algorithm, the space complexity of the algorithm will be proportional to n.

The complexity of an algorithm (either time complexity or space complexity) is represented using asymptotic notations.
One of the asymptotic notations is O (big-oh) notation.
Big-oh (O) notation is also called upper bound of the complexity.
If we get the total number of element comparisons is ½ n2 – ½ n, then we can write it as O (n2).
Since (½ n2 – ½ n) <>

Preview <<

This is the end Of Chapter 1

No comments:

Post a Comment


About Me

Dhaka, Dhaka, Bangladesh