reading-notes

Software Development Reading Notes

View project on GitHub

Stacks & Queues

Find the correct word to complete the question.

Common terminology for a stack is

1.Nodes or items that are put into the stack are _____.

a. top
b. added
c. next
d. pushed

2.Nodes or items that are removed from the stack are _____. When attempting to empty stack.

a. pushed
b. popped
c. removed
d. emptied

3.When you _____ you will view the value of the top Node in the stack.

a. push
b. assign temp
c. peek
d. assign

4.____This means that the first item in the queue will be the first item out of the queue

a. LILO
b. ENQUE
c. FIFO
d. FILO

5.When you add an item to a queue, you use the __ action.

a. dequeue
b  enqueue

Analogy of a stack and a que…….

It's like a small elevator at a large attraction...It can pick people up on different floors. The people are filed in, in order. First in are the last off. Sorta like that.

* * * *

  • IF YOU CAN DREAM IT * *
  • YOU CAN CODE IT * *
  • @ @
  • <
  • ~~
    * *********************************************

Solutions

  1. d-pushed
  2. b-popped
  3. c-peek
  4. c-FIFO
  5. b-enqueue