Question: c++ points) write a function TLCS(T& d, T&b) that returns the smallest common ancestor of two nodes in a BST. If the tree is empty,

c++
points) write a function TLCS(T& d, T&b) that returns the smallest common ancestor of two nodes in a BST. If the tree is empty, or if it has less than three nodes, it returns -1. For example the LCS(6,12)= 10 16 10 25 8 12 20 30 18 22
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
