Question: 2. A dense binary Tree is one in which the number of nodes in the tree is greater than twice its maximum depth. Write a
2. A dense binary Tree is one in which the number of nodes in the tree is greater than twice its maximum depth. Write a function isDense Tree a -> Bool that tests whether a Tree is dense. (Use the Tree definition from Exercise 11.9 in your text. The haskell version is given below.) Run the following test, and turn in a listing of your function, and the results of the test run. data Tree dta = Empty | Node (Tree dta, dta, Tree dta) (isDense (Node (Node (Node (Empty, "a", Empty), "b", Empty), "c" Empty)), isDense (Node (Node (Node (Empty, "a", Empty), "b", Node (Empty, "c", Empty)), "f, Node (Node (Empty, "d", Empty), "m
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
