Programming/Algorithms
Adapted from: https://www.bigocheatsheet.com/
Data Structure | Time Complexity | Space Complexity | |||
---|---|---|---|---|---|
Average -> Worst | |||||
Access | Search | Insertion | Deletion | ||
Array | Θ(1) -> O(1) | Θ(n) -> O(n) | Θ(n) -> O(n) | Θ(n) -> O(n) | O(n) |
Data Structure | Time Complexity | Space Complexity | |||
---|---|---|---|---|---|
Average -> Worst | |||||
Access | Search | Insertion | Deletion | ||
Array | Θ(1) -> O(1) | Θ(n) -> O(n) | Θ(n) -> O(n) | Θ(n) -> O(n) | O(n) |