diff options
author | Joe Zhao <ztuowen@gmail.com> | 2015-04-13 15:21:21 +0800 |
---|---|---|
committer | Joe Zhao <ztuowen@gmail.com> | 2015-04-13 15:21:21 +0800 |
commit | a39aea354b071612c071d98125e879fe14c76a54 (patch) | |
tree | 9d960eb2c970245e4fa5ffc2b51c25e0547972fb /H63.hs | |
parent | 84e6753005e57827c78b50ad0a26ffa0d0da55e4 (diff) | |
download | h99-a39aea354b071612c071d98125e879fe14c76a54.tar.gz h99-a39aea354b071612c071d98125e879fe14c76a54.tar.bz2 h99-a39aea354b071612c071d98125e879fe14c76a54.zip |
+61 +62 +63
Diffstat (limited to 'H63.hs')
-rw-r--r-- | H63.hs | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -0,0 +1,8 @@ +import Tree + +completeBinaryTree n = makeTree 1 + where makeTree x + | x > n = Empty + | otherwise = Branch 'x' (makeTree (2*x)) (makeTree (2*x+1)) + +isCompleteBinaryTree |