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

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!