void traverse(BTreeNode* root) { if (root != NULL) { int i; for (i = 0; i < root->n; i++) { if (!root->leaf) { traverse(root->children[i]); } printf("%d ", root->keys[i]); } if (!root->leaf) { traverse(root->children[i]); } } }