How to find the level of node in binary tree in haskell

前端 未结 0 1121
不思量自难忘°
不思量自难忘° 2021-02-13 23:23

I am trying to find the level at which a certain node is for example if binary tree is:

(Node (Node (Node (Node Leaf Leaf 9) Leaf 8) Leaf 7) Leaf 6)

Level of 9 is

相关标签:
回答
  • 消灭零回复
提交回复
热议问题