Question: Python Write the function remove_descendants (t,k) that receives a reference to a binary search tree t and an integer k and removes from t all
Python

Write the function remove_descendants (t,k) that receives a reference to a binary search tree t and an integer k and removes from t all descendants of the node that contains k. If k is not in the tree, your function should leave the tree unchanged. For example, if t is the tree from question 1, after executing remove_descendants (t,11),t should be the tree below: Write the function remove_descendants (t,k) that receives a reference to a binary search tree t and an integer k and removes from t all descendants of the node that contains k. If k is not in the tree, your function should leave the tree unchanged. For example, if t is the tree from question 1, after executing remove_descendants (t,11),t should be the tree below
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
