B4.1 Fundamentals of ADTsB4.1.4
Structures and properties of binary search trees (BSTs)
Explain the structures and properties of binary search trees (BSTs)
AHL≈ 60 minCommand term: ExplainPremium
In this lesson
- Using the vocabulary of trees: root, parent, child, leaf, subtree, height
- Explaining the BST ordering property and how it organises data for fast searching
- Inserting, searching for and deleting keys, and sketching the resulting tree
- Carrying out in-order, pre-order and post-order traversals
- Explaining why a balanced tree gives O(log n) searches and a skewed tree O(n)
This lesson is part of Premium
Every topic has one free lesson. Premium unlocks every interactive lesson, the exam-style questions at the end of each one, and the rest of Praxis IB.
What's inside
- LearnTrees that keep data in order
- LabGrow a search tree
- LearnDeleting a node
- CodeA BST in code
- LearnTraversals of the tree 50, 30, 70, 20, 40, 60, 80
- CheckQuick check
- ExamWorked exam answer
- ReviewMistakes examiners see
- Exam practiceExam-style questions
Ends with 4 exam-style questions worth 11 marks, with a self-marking markscheme.