I am constructing a binary search tree of size 7 and height 3. I only have to hard-code it, not generate it through a function.
This is the tree that I have hard-coded
Node (Node (Node (Empty, 0, Empty), 1,
Node (Empty, 3, Empty)), 5
Node (Empty, 7, Node (8, 9, Empty))))
What I want is for Node 9 to have two children (8 and Empty). However, I keep on getting an error on 8 that says "this expression has type int but an expression of was expected of type int tree". How can I correct this?
Thanks!