Question: Write a recursive function called findSecondSmallest for the BinarySearchTree class that returns a pointer to the node containing the second smallest item. If there

Write a recursive function called findSecondSmallest for the BinarySearchTree class that returns 

Write a recursive function called findSecondSmallest for the BinarySearchTree class that returns a pointer to the node containing the second smallest item. If there is no such item, then return nullptr. The function prototype is shown below. BinaryNode * findSecondSmallest (BinaryNode* t) const;

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

include struct BinaryNode int data BinaryNode left BinaryNode right BinaryNodeint value datavalue le... View full answer

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 Programming Questions!