From a39aea354b071612c071d98125e879fe14c76a54 Mon Sep 17 00:00:00 2001 From: Joe Zhao Date: Mon, 13 Apr 2015 15:21:21 +0800 Subject: +61 +62 +63 --- H63.hs | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 H63.hs (limited to 'H63.hs') diff --git a/H63.hs b/H63.hs new file mode 100644 index 0000000..03f081e --- /dev/null +++ b/H63.hs @@ -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 -- cgit v1.2.3-70-g09d2