Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Stack Data Structure in C Using Array

Time Complexity: Worst Case Scenario would be O(n) in case of an array implementation of stack where the array is completely filled, then the array size needs to be changed and all the elements must be copied from one array to another, this would result in time complexity being O(n).

Space Complexity: Space complexity for each operation in a stack is O(1), as no extra space is required for any operation.

Stack Data Structure Explanation