Grokking Algorithm Complexity and Big-O
Ask Author
Back to course home

0% completed

Logarithmic Time and Space: O(log n)
Table of Contents

Contents are not accessible

Contents are not accessible

Contents are not accessible

Contents are not accessible

Contents are not accessible

Logarithmic Time Complexity O(\log n) and Logarithmic Space Complexity O(\log n) occur in algorithms that repeatedly reduce the problem size by a constant factor (often halving). This type of complexity is common in algorithms that use recursive division, such as finding powers or performing binary searches.

Key Characteristics

In an algorithm with O(\log n) time and space complexity:

  • Time Complexity: The runtime grows logarithmically as the input size increases, due to dividing the problem in each step.

.....

.....

.....

Like the course? Get enrolled and start learning!

Table of Contents

Contents are not accessible

Contents are not accessible

Contents are not accessible

Contents are not accessible

Contents are not accessible