basic operations in linked lists, stacks and queues