Write a C++ code that contains a function List2tree(list) that converts a list into a binary search tree and returns a pointer to the constructed tree. The nodes of the binary search tree should be allocated dynamically (not a fixed. Write a small program that takes elements from a user, inserts them into a list, and then when the user is done inputting elements, calls the List2tree(list) function to create the binary tree, and displays the pre-order. Your code should ask the use to enter his digits (undefined number of digits i.e.: don't ask the user to enter how many digits would he enters).
Unfortunately, your question requires a lot of work and cannot be done for free. Submit it with all requirements as an assignment to our control panel and we'll assist you.