How To Create B-Tree Of Order M by Using Reactive Method
///Order Must Be Odd #include<iostream> #include<vector> #include<algorithm> using namespace std; struct Node { int order;///contains order vector<int> key;///to store keys vector<Node*> child;///to store child bool isLeaf;///flag to indicate whether the node is leaf node or not.if the node is leaf then no key in that node will have child ///but if node is not leaf then all the keys will have left and right child Node(int order) { this->order=order; isLeaf=false; } bool isFull()///to check node is full or not { return(key.size()==(order-1)); } }; int divide(Node *root,Node *extra,int *mid_index)///function to divide root by mid value and returns mid value,stores half values in root and half inside extra node { ...