August 26, 2024

P72 - Construct the postorder sequence of the tree nodes.

Write a methodpostorderwhich constructs the postorder sequence of the nodes of a multiway tree. The result should be aList.

> "afg^^c^bd^e^^^".postorder
  res0: List[Char] = List(g, f, c, d, e, b, a)
Be first to comment
Leave a reply