Implementations of Stack and Queue using linked lists