GoConqr has a new look! Let us know what you think.

Flashcards

Stacks & Queues

Virginie Gagné Computer Science English 10 cards

Stacks & Queues

Cards in this deck (10)

  1. 1What's an ADTAn ADT defines a data type by the values that data can have and operations on the data (eg Lists...)
  2. 2Define a stackadt w two operations: push and pop
  3. 3Data structures for a stack, how to use and whyarray lists: addLast and removeLast
    singly linked lists: from the front
    doubly l l : doesn't matter
  4. 4Stack overflow vs underflowfull then try to push,
    empty then try to pop
  5. 5Whats the call stack.
  6. 6alg for parenthesesalg for parentheses
  7. 7define a queueFirst come first served policy.
    Two basic operations: enqueue(e) and dequeue()
  8. 8data structures for queuessingly l l : enqueue and dequeue with addlast and removefirst
    doubly l l: works too
    array list: enque is addlast and dequeue is removefirst but dequeue inefficient
    circular array
  9. 9tail formula for circular arraytail = (head+size-1)mod length
  10. 10alg for circular arrayalg for circular array

Information

Description
Computer Science Flashcards on Stacks & Queues, created by Virginie Gagné on 15/04/2022.
Created by
Virginie Gagné
Views
0
Rating

Feedback

What is it about?

What do you think of the new look?

How do you like it?