Goal: Implement a stack using a dynamic array to handle elements in a Last In First Out (LIFO) manner.
StackArray
class with internal resizable arraypush(value)
โ add element to endpop()
โ remove element from endpeek()
โ return last element without removinggetSize()
โ current number of elementsisEmpty()
โ check if stack is emptyundefined
when popping empty stackundefined
when peeking empty stackGoal: Implement a stack using a singly linked list for LIFO behavior.