adriansky
10/5/2018 - 1:11 PM

Big O table

.Time complexity for a Binary Search Tree (BST)
|===
.2+.^s| Data Structure 2+^s| Searching By .2+^.^s| Insert .2+^.^s| Delete .2+^.^s| Space Complexity
^|_Index/Key_ ^|_Value_
| BST (**un**balanced) ^|- ^|O(n) ^|O(n) ^|O(n) ^|O(n)
| BST (balanced) ^|- ^|O(log n) ^|O(log n) ^|O(log n) ^|O(n)
|===
.Time complexity of array operations
|===
.2+.^s| Data Structure 2+^s| Searching By 3+^s| Inserting at the 3+^s| Deleting from .2+.^s| Space Complexity
|_Index/Key_ |_Value_ |_beginning_ |_middle_ |_end_ |_beginning_ |_middle_ |_end_
| Array ^|O(1) ^|O(n) ^|O(n) ^|O(n) ^|O(1) ^|O(n) ^|O(n) ^|O(1) ^|O(n)
|===