Concept Flow - Dynamic Stack Using Resizable Array
Start
Push Element
Check Capacity
Add Element at Top
Yes
Resize Array (Double Size)
Copy Old Elements to New Array
Add Element at Top
Update Top Index
Pop Element
Check if Array is Too Large
Remove Top Element
Yes
Resize Array (Half Size)
Copy Elements to Smaller Array
Update Top Index
End
The stack adds elements at the top, resizing the array when full by doubling its size, and shrinks the array by half when too empty after popping.