Stacks and Queues
Main terminally summaries to see quick difference between Stacks and Queues.
Stacks
Stack Terminology
- Push - Nodes or items that are put into the stack are pushed
- Pop - Nodes or items that are removed from the stack are popped. When you attempt to pop an empty stack an exception will be raised.
- Top - This is the top of the stack.
- Peek - When you peek you will view the value of the top Node in the stack. When you attempt to peek an empty stack an exception will be raised.
- IsEmpty - returns true when stack is empty otherwise returns false.
Stack Concepts
- FILO - First In Last Out
- LIFO - Last In First Out
Queue
Queue Terminology
- Enqueue - Nodes or items that are added to the queue.
- Dequeue - Nodes or items that are removed from the queue. If called when the queue is empty an exception will be raised.
- Front - This is the front/first Node of the queue.
- Rear - This is the rear/last Node of the queue.
- Peek - When you peek you will view the value of the front Node in the queue. If called when the queue is empty an exception will be raised.
- IsEmpty - returns true when queue is empty otherwise returns false.
Queue Concepts
- FIFO - First In First Out
- LIFO - Last In Last Out
I hope this email finds you well. I would like to express my sincerest apologies for the delayed response to your previous email regarding [mention the specific subject or position]. Due to unforeseen circumstances, I regrettably missed your message, and I deeply apologize for any inconvenience or concern this may have caused.
I want to assure you that my commitment to this opportunity remains unwavering.