Define a recursive function called get_concatenated_words (bst) which takes a binary search tree as a parameter. The fun
Posted: Fri May 20, 2022 6:21 pm
Define a recursive function called get_concatenated_words (bst) which takes a binary search tree as a parameter. The function returns a string object containing values in the in-order traversal of the parameter binary search tree. You can assume that the parameter binary search tree is not empty. IMPORTANT: For this exercise, you will be defining a function which USES the BinarySearchTree ADT. A BinarySearchTree implementation is provided to you as part of this exercise - you should not define your own BinarySearchTree class. Instead, your code can make use of any of the BinarySearchTree ADT fields and methods. For example: Test Result print(get_concatenated_words (tree)) ABCDEFGHIKNPRUY = athote bst = BinarySearchTree('hot') bst.set_left(BinarySearchTree('at')) bst.set_right(BinarySearchTree('o')) print (get_concatenated_words (bst))