Lesson: Binary trees
• Participants name integers
• Leader adds them to a growing sorted binary tree
• At some point, the integers are probes, not inserts median?
• Enumeration of operations
• insert
• search
• delete (seems hard)
• modify a node (seems as hard as delete followed by insert)
• enumerate all nodes
• find the smallest element (seems easy)
• find the middle element (seems hard)
• What is the cost of searching for a target? O(log n).
Sumber: Finkel, Raphael, 2009. How to Teach Data Structures.
Author: rasp
Saya adalah pejuang, pekerja informatics ipos, mujahid fi sabil lillaah, hamba Allah SWT.
View all posts by rasp