Implement Stack using Linked list.
To implement a stack using the singly linked list concept, all the singly linked list operations are performed based on Stack operations LIFO(last in first out).
Assume all nodes in the linked list are 0-indexed.
Implement the Stack class:
push(data) : Add data to the stack and adjust the head pointing to top.
pop() : Remove data from the stack and adjust the head pointing to top.
status() : Display the elements of stack.
Data should be integer value.
push, push, push, push
1, 2, 3, 4
4=>3=>2=>1=>None
push, pop, push, pop
10, -, 20, -
None
push, push, push, pop, pop, pop, pop, pop, push
1, 2, 3, -, -, -, -, -, 10
10=>None