Concept Flow - Dynamic Stack Using Resizable Array
Start
Push Operation
Check if array is full?
No→Add element at top
Yes
Double array size
Add element at top
Pop Operation
Check if stack empty?
Yes→Error or return null
No
Remove element from top
Check if array too empty?
Yes
Halve array size
End
The stack uses an array that grows when full and shrinks when too empty, adjusting size dynamically during push and pop operations.
