You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Stack/Array/C/ReadMe.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
# Stack Data Structure in C Using Array
2
-
Time Complexity: O(n), where n is the number of nodes in the tree
2
+
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).
3
3
4
4
Space Complexity: Space complexity for each operation in a stack is O(1), as no extra space is required for any operation.
0 commit comments