private SplitResult insert(BTreeNode root,int data){
        if(root.isLeaf){
            if(!root.isFull()){
                root.insertKey(data, null, null);
                return null;
            }else{
                SplitResult sr = splitNode(root,data,null,null);
                return sr;
            }
        }else{
            int i=0;
            for(; i < root.n; i++){
                if(data <= root.keys[i]){
                    SplitResult sr = insert(root.child[i],data);
                    if(sr == null){
                        return null;
                    }else{
                        if(!root.isFull()){
                            root.insertKey(sr.c, sr.r1, sr.r2);
                            return null;
                        }else{
                            SplitResult sr1 = splitNode(root,sr.c,sr.r1,sr.r2);
                            return sr1;
                        }
                    }
                }
            }
            if(i == root.n){
                SplitResult sr = insert(root.child[i],data);
                if(sr == null){
                    return null;
                }else{
                    if(!root.isFull()){
                        root.insertKey(sr.c, sr.r1, sr.r2);
                        return null;
                    }else{
                        SplitResult sr1 = splitNode(root,sr.c,sr.r1,sr.r2);
                        return sr1;
                    }
                }
            }
        }
        return null;
    }
http://www.geeksforgeeks.org/b-tree-set-1-insert-2/
http://www.geeksforgeeks.org/b-tree-set-1-introduction-2/
src/com/interview/tree/BTree.java