Question: Please use Ocaml for the coding Problem 4: Trees Part 1: Write a function min_three that returns the smallest input of three input. val min_tree
Please use Ocaml for the coding
Problem 4: Trees
Part 1: Write a function min_three that returns the smallest input of three input.
val min_tree : 'a -> 'a -> 'a -> 'a =
Part 2: Write a function that takes a tree and returns the smallest value in the tree. You will probably want to use the function in part 1 to help with writing this function. If the tree is empty, raise a Failure exception with the message \"tree is empty.\" Do NOT assume the tree is a binary search tree.
val min_value : 'a tree -> 'a =
For example, the smallest value in the tree below is 0.
1 / \\ 2 0 / \\ / \\ 1 3 6 1
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
