GoConqr hat ein neues Design! Sag uns, wie es dir gefällt.

Karteikarten

5. Data Structures

Scott Jones Computer Science A Level Englisch 18 Karten

5. Data Structures

Karten in diesem Stapel (18)

  1. 1See AS for basic description of arrays and records-.-
  2. 2How can arrays and records be used to allow arrays to store more than one data type?An array of records can be created
  3. 3What are the properties of the list data type?- Stores same data types
    - Mutable
  4. 4What are the properties of the tuple data type?- Stores same data types
    - Immutable
  5. 5What are the properties of the stack data type?- Last In First Out (LIFO) data type
    - One pointer pointing to the last item
  6. 6What are the properties of the queue data type?- First In First Out (FIFO) data type
    - One pointer pointing to the last item and one pointing to the first
  7. 7What is 'pushing'?Adding an item to a stack
  8. 8What is 'popping'?Removing an item from a stack
  9. 9What is 'peeking/topping'?Viewing the last item in the stack
  10. 10What is the algorithm for pushing to a stack?1. Check if the stack is full
    2. If full, return an error
    3. Increment pointer
    4. Insert new data at the pointer position
  11. 11What is the algorithm for popping from a stack1. Check if the stack is empty
    2. If empty, return an error
    3. Copy data from the pointer position
    4. Decrement pointer
  12. 12What is the algorithm for inserting into a queue?1. Check if the queue is full
    2. If full, return an error
    3. Increment the back pointer
    4. Insert data at the pointer location
  13. 13What is the algorithm for removing from a queue?1. Check if the queue is empty
    2. If empty, return an error
    3. Copy data from the front pointer location
    4. Decrement the pointer
  14. 14Circular queue visulisationCircular queue visulisation
  15. 15How do we know that a circular queue is full?The rear pointer is one place behind the front pointer
  16. 16How do we know that a circular queue is empty?The rear pointer is on the same place as the front pointer
  17. 17What are the properties of a priority queue?- All items added have a priority
    - Their position when added to the queue depends on their priority
  18. 18Priority queue examplePriority queue example

Informationen

Beschreibung
A Level Computer Science ((A2) Unit 4: Computer Architecture, Data, Communication...) Karteikarten am 5. Data Structures, erstellt von Scott Jones am 12/10/2020.
Erstellt von
Scott Jones
Aufrufe
0
Bewertung

Feedback

Worum geht es?

Wie gefällt dir das neue Design?

Dein Eindruck