Implementation of stack using linked list