Lab 4 Binary search Trees Write code for the following methods of binary search trees (1)SEARCH(x, k)(recursion and iterative version); (20%) (2)MINIMUN(x)and MAXIMUN(x); (10%) (3)SUCCESSOR(x)and PREDECESSOR(x); (30%) (4) INSERT(T,z);(20%) (5)DELETE(T, z).(30%) Note. T' points the root of a binary search tree, x points any node in a binary search tress, and k denotes a key
Lab 4 Binary Search Trees. Write code for the following methods of binary search trees. (1) SEARCH(x, k) (recursion and iterative version); (20%) (2) MINIMUN(x) and MAXIMUN(x); (10%) (3) SUCCESSOR(x) and PREDECESSOR(x); (30%) (4) INSERT(T, z); (20%) (5) DELETE(T, z). (30%) Note. T points the root of a binary search tree, x points any node in a binary search tress, and k denotes a key