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

Karteikarten

Binary Search Trees

Virginie Gagné Computer Science Englisch 7 Karten

Binary Search Trees

Karten in diesem Stapel (7)

  1. 1define binary search treea binary tree s.t.
    1. each node contains an element, called a key, such that the keys are comparable, namely there is a strict ordering relation < between keys of different nodes
    2. any two nodes have different keys
    3.for any node,
    — all keys in the left subtree are less than the node's key
    — all keys in the right subtree are greater than the node's key.
    4. in-order traversal gives the elements in order
  2. 2find(key) finMin() algorithmsfind(key) finMin() algorithms
  3. 3findMax() algfindMax() alg
  4. 4add(key) algadd(key) alg
  5. 5remove(root, key) algremove(root, key) alg
  6. 6—
  7. 7Computational complexitybest case: when the keys are arranged such that the tree is balanced (all leaves are at the same depth)
    worst case: height n-1
    Computational complexity

Informationen

Beschreibung
Computer Science Karteikarten am Binary Search Trees, erstellt von Virginie Gagné am 15/04/2022.
Erstellt von
Virginie Gagné
Aufrufe
1
Bewertung

Feedback

Worum geht es?

Wie gefällt dir das neue Design?

Dein Eindruck