Question: in c++ code only The veterinary team at the Animal Shelter would like to be able to search for pets by age so that they



The veterinary team at the Animal Shelter would like to be able to search for pets by "age" so that they can give them the proper vaccines. You will be using the following definitions to implement basic operations for a binary search tree class containing pointers to Pet objects. // Returns pointer to TreeNode that matches the given age // Nullptr if no match is found TreeNode* search(TreeNode *root, int age) \{ // add your code here // // The three traversals below will neatly print to screen // the Pets' names and ages in the respective order void inorder(TreeNode * root) \{ \} // add your code here void preorder(TreeNode * root) \{ void preorderDisplay()\{ preorder(root); void postorderDisplay()\{ postorder(root)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
