In this article, we will explore about various operations on Stack Data Structure and the Time and Space Complexity of each operation for various cases like Best case, Average case and Worst case.
Table of contents:
Basics of StackPush in StackTime ComplexitySpace ComplexityPOP in StackTime ComplexitySpace ComplexityPeek in StackTime ComplexitySpace ComplexityConclusion
Pre-requisite:
Stack data structureImplementing a Stack using an Array and Linked listAs a summary:
...
Published on December 22, 2021 01:09