|
Παρουσίαση με Ετικέτες
Όλες οι Ετικέτε... » Binary-Tree (RSS)
-
There is a need to find the height of a binary tree. Meaning beginning from root (0), the maximum hopes to ''highest'' leaf.Having the definition: data Tree a = Node a (Tree a) (Tree a) | Emptyshowing a Tree could be a node with two (node or empty ) or empty, the following recursive algorithm takes six lines of code in Haskell: height tree ...
|
|
|