Continue from last week.
The lecture is about Binary Search Tree. Bst_del_rec is a
function that deletes a node of tree and return the changed tree. There are 4
recursive cases and one base case in the function. It is BST, so left value is
always less than the tree’s value and right value is larger than the tree’s
value. This is used in the method to find the largest value of tree and
recursive cases. Efficiency of algorithm is new in this class, CSC148. It
considers about iteration vs. recursion, and extra memory.
No comments:
Post a Comment