Question: Complete the function find in BTreeNode.cpp that accepts a BTreeNode * and an int val, and must return the BTreeNode * that contains the matching

Complete the function find in BTreeNode.cpp that accepts a BTreeNode * and an int val, and must return the BTreeNode * that contains the matching val, or NULL if val was not found. ## BTreeNode.h##

#ifndef BTREENODE_H #define BTREENODE_H

#include #include #include

struct BTreeNode { bool is_leaf_=true; std::vector elements_; std::vector children_; BTreeNode() {} BTreeNode (std::vector v) { this->elements_ = v; } };

BTreeNode* find(BTreeNode* root, int key);

#endif

## BTreeNode.cpp ##

#include #include "BTreeNode.h"

BTreeNode* find(BTreeNode* root, int key) { // Code Here int i = 1; return NULL; }

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!