Question: I need help with the Haskell assignment. The language is haskell and the assignment is regarding the heap data structure. For Questions 7 and 8,
I need help with the Haskell assignment. The language is haskell and the assignment is regarding the heap data structure.


For Questions 7 and 8, use the datatype Tree below, which defines a binary tree with values attached to each leaf and interior node. data Tree a = L a | Br a (Tree a) (Tree a) deriving (Eq, Show) sample! = Br 'a' (L 'b') (Br 'c' (L 'd') (L 'e')) sample2 Br 9 (Br 7 (L 6) (Br 7 (L 7) (L6))) (L 9) For Questions 7 and 8, use the datatype Tree below, which defines a binary tree with values attached to each leaf and interior node. data Tree a = L a | Br a (Tree a) (Tree a) deriving (Eq, Show) sample! = Br 'a' (L 'b') (Br 'c' (L 'd') (L 'e')) sample2 Br 9 (Br 7 (L 6) (Br 7 (L 7) (L6))) (L 9)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
