Copyright | Copyright (C) 2021 Yoo Chung |
---|---|
License | GPL-3.0-or-later |
Maintainer | dev@chungyc.org |
Safe Haskell | Safe-Inferred |
Language | GHC2021 |
Some solutions to Problems.P71 of Ninety-Nine Haskell Problems.
Synopsis
- internalPathLength :: MultiwayTree a -> Int
Documentation
internalPathLength :: MultiwayTree a -> Int Source #
Determine the internal path length of a tree.
We define the internal path length of a multiway tree as
the total sum of the path lengths from the root to all nodes of the tree.
By this definition, multitree5
has an internal path length of 9.