Όλες οι Ετικέτε... »
Haskell »
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 ...