[prev] [index] [next]

2-3-4 Trees (cont)

2-3-4 tree implementation:

typedef struct node Node;
typedef struct node *Tree;
struct node {
    int  order;    // 2, 3 or 4
    Item data[3];  // items in node
    Tree child[4]; // links to subtrees
};

Example:

[Diagram:Pics/trees/2-3-4-node.png]