Big O Notation - Time Complexity

Big O notation is used to describe the efficiency of an algorithm, focusing on its time complexity (how the execution time grows with input size) and space complexity (how much extra memory is needed). It expresses the worst-case scenario performance of an algorithm.


Common Complexities


Data Structures and Their Time Complexities

  1. Hash Table
  2. B-Tree
  3. Balanced Binary Search Tree (e.g., AVL Tree, Red-Black Tree)
  4. Binary Search Tree (BST)

  5. B-Tree Balancing

    B-Trees are inherently balanced during indexing, so they do not require rebalancing in the way that some other tree structures, like AVL trees or Red-Black trees, do.

    Because of this, B-Trees are particularly well-suited for use in databases and file systems where efficient data retrieval and storage are critical.


  6. Array (Fixed size)
  7. Linked List
  8. Heap (Priority Queue)
  9. Graph (Adjacency Matrix/Adjacency List)
  10. Stack/Queue