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

Karteikarten

Introduction to Data Structures

Neja Cesnik Computer Science Englisch 11 Karten

Karten in diesem Stapel (11)

  1. 1Stack1. Linear data structure
    2. Data is added or pushed onto the top of the stack
    3. Data is removed or popped from the top of the stack
    4. Stack is a LIFO last in first out data structure
  2. 2Queue1. Linear data structure
    2. Data is added to the tail of the queue
    3. Data is removed from the head of the queue
    4. Queue is a FIFO first in in first out data structure
  3. 3ImplementationStatic (array - define the amount of storage needed when you write the program)
    Dynamic (linked list - data is allocated when required during running time)
  4. 4How do you make array storing queue more efficient?Use a circular array
  5. 5Give 2 advantages and 2 disadvantages of arrays vs linked list as candidates for holding a data structureArrays - fixed length, you use specific space allocated, cannot add in the middle
    Linked list - dynamic, can always extend/shorten, can add whenever in between
  6. 6What distinguishes a recursive method from a non-recursive method?Recursive method will call itself
  7. 7What does it mean by programming term recursively and give one + and one - of itRecursion is a programming technique where a method includes a call to itself /
  8. 8Define a balanced binary tree and explain why would you use this over a non-balancedA tree is balanced if for every node the difference in depth of its two subtrees is at most one. Better search time
  9. 9What is the significance of using keys in binary trees?The nodes are implemented and sorted using a specific key, it allows us to search for a specific node, we can only have one node with such key, we can print in the order of keys
  10. 10What is the difference between solving a problem using iteration vs recursion?loop (quicker, harder to implement) vs recursion (easier to implement)
    Recursion is better than iteration for problems that can be broken down into multiple, smaller pieces.
  11. 11Stack using arrayFull when top == maxSize-1
    Empty when top == -1

Informationen

Beschreibung
Computer Science Karteikarten am Introduction to Data Structures, erstellt von Neja Cesnik am 13/05/2018.
Erstellt von
Neja Cesnik · Mai 2018
Aktualisiert
13 Mai 2018
Aufrufe
0
Bewertung

Feedback

Worum geht es?

Wie gefällt dir das neue Design?

Dein Eindruck