summaryrefslogtreecommitdiff
path: root/H63.hs
blob: 03f081e9d060754de4f2cca3246f69c479a54c6c (plain)
1
2
3
4
5
6
7
8
import Tree

completeBinaryTree n = makeTree 1
    where makeTree x
            | x > n = Empty
            | otherwise = Branch 'x' (makeTree (2*x)) (makeTree (2*x+1))

isCompleteBinaryTree