June 2020
Intermediate to advanced
382 pages
11h 39m
English
Let's look into the time complexity of stacks (using Big O notation):
| Operations | Time Complexity |
| push | O(1) |
| pop | O(1) |
| size | O(1) |
| peek | O(1) |
An important thing to note is that the performance of none of the four operations mentioned in the preceding table depends on the size of the stack.
Read now
Unlock full access