Skip to content

Commit 149ac67

Browse files
Update ReadMe.md, Fixes #53
1 parent cf59ae9 commit 149ac67

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Stack/Array/C/ReadMe.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# 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).
33

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

0 commit comments

Comments
 (0)