August 26, 2024

P70C - Count the nodes of a multiway tree.

Write a methodnodeCountwhich counts the nodes of a given multiway tree.

> MTree('a', List(MTree('f'))).nodeCount
  res0: Int = 2
Be first to comment
Leave a reply