Implemented stack and queue.