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

Karteikarten

[Almost Done] Trees | Data Structures - OCR Computer Science A Level

Malachy Moran-Tun Computer Science A level Englisch 8 Karten

Karten in diesem Stapel (8)

  1. 1What is a (Rooted) Tree?> Type of abstract data structure
    > Similar to graphs, with "branches" or edges between each node
    > One root note at the top, representing the top of the hierarchical structure
    > Nodes at the bottom are known as leaf notes, representing the bottom of the hierarchical structure
  2. 2What are some Examples of Trees being Used?> Hierarchical data, such as folder structures, in OSs
    > Making information easy to search for (i.e.: binary trees)
    > Manipulating sorted lists of data
  3. 3Define the Following Terms used with Trees: > Node > Edge > Root > Child > Parent > Subtree > Leaf> Node - the data itself contained in the tree
    > Edge - connector between two nodes
    > Root - top of the hierarchy, the only node with no incoming edges
    > Child - set of nodes that have incoming edges from the same node
    > Parent - node with outgoing edges to children
    > Subtree - set of nodes and edges comprised of a parent and all its descendants
    > Leaf - a node with no children
  4. 4What is a Binary Tree?> Rooted tree with a maximum of two children
    > Usually used to search for items (when organised in such a fashion)
  5. 5How would you Construct a Binary Search Tree?> Place the first item at the root
    > For each item in the list, visit the root, and branch left or right if the value is less than or greater than the root respectively
    > Continue down the branch with the same rule until a leaf node is reached
    > Branch down and place the item to the left or right of the leaf node
  6. 6What are the 3 Ways of Traversing a Binary Tree?> Pre-order traversal
    > In-order traversal
    > Post-order traversal
    the names of which refer to whether the root of each subtree has been visited before, between, or after both branches
  7. 7What's the Easy Way of Traversing a Binary Tree?draw lines lmao- it's that simple
    > Pre-order traversal - mark the left of each node
    > In-order traversal - mark the bottom of each node
    > Post-order traversal - mark the right of each node
    then draw an outline around the tree, starting to the left of the root node, and ending at the right of it
  8. 8What's the Hard Way of Traversing a Binary Tree?idk lol i forgot
    textbook doesn't say

Informationen

Beschreibung
A level Computer Science (Data Structures) Karteikarten am [Almost Done] Trees | Data Structures - OCR Computer Science A Level, erstellt von Malachy Moran-Tun am 11/10/2021.
Erstellt von
Malachy Moran-Tun
Aufrufe
2
Verlauf
  • Erstellt von Malachy Moran-Tun · 6 Okt 2021
  • Kopiert von Malachy Moran-Tun · 11 Okt 2021
Bewertung

Feedback

Worum geht es?

Wie gefällt dir das neue Design?

Dein Eindruck