This page has focused on time complexity.

Let's now introduce ourselves to space complexity.

Space complexity compared to time complexity:


Almost all data structures have a space complexity of O(n) as shown here.

Space complexity is a more important factor for linear searching algorithms (bubble sort, quick sort, merge sort, etc).