Multiway Search Trees

Definition

3-way trees

  • Elements:

    • left_element
    • right_element
  • References

    • left_tree: nodes which their elements are less than left_element
    • middle_tree: nodes which their elements are between left_element and right_element
    • right_tree: nodes which theire elements are greater than right_element
template<typename Type>
class ThreeWayNode {
    private:
        Type left_element, right_element;
        ThreeWayNode *left_tree, *middle_tree, *right_tree;

    public:
        ThreeWayNode();

        isFull();
};

In [ ]: