0
通行证下面的功能,通过此Binary Tree:OCaml的二叉树
let rec inorder(t:tree) : int list =
begin match t with
| Empty -> []
| Node (left, x, right) -> inorder left @ (x :: inorder right)
end
为什么结果[1; 2; 3; 4; 5; 6; 7]和不[1; 2; 3; 4 ; 5; 7; 6]?
树实际上是在一个问题集中给出 - 也许答案的关键是错误的,然后 – user