Stack data structure using linked lists