Starting from:
$35

$29

Sorted Set Lab Solution

Write a sorted set data structure using binary search trees. Then, read in numbers from a file named infile.dat, inserting them into an instance of your sorted set. You will then prompt the user for a value, and search the tree to determine if the value is found in the tree. If the value is present, output "Yes" and no other text. If the value is missing, output "No" and no other text.




SortedSet {




isEmpty()




add(value)




remove(value)




contains(value)




}




Example:
















infile.dat




1, 2, 3, 4, 5, 6, 7




Program




Sorted Set A Contains 1, 2, 3, 4, 5, 6, 7




User Input = 9




Output




No










Note: You must not submit your "node_modules" folder if you are working on NodeJs/JavaScript. (Just submit your JavaScript source code and package.json file)




















More products