stack and queue based on linked list