How to use `OCaml` to implement `Find the k-th child of a node in a tree`?
How to use OCaml to implement Find the k-th child of a node in a tree?
Suppose the tree is defined as follows:
type 'a tree = Leaf of 'a | Node of 'a * 'a tree * 'a tree ;;
No comments:
Post a Comment