The test file has the preorder and inorder values swapped
treeFromTraversals ["i"; "a"; "f"; "x"; "r"] ["a"; "i"; "x"; "f"; "r"] |> should equal expected
Contrast with the canonical data
"input": {
"preorder": ["a", "i", "x", "f", "r"],
"inorder": ["i", "a", "f", "x", "r"]
},
CI is passing because the example solution casually flips the arguments:
let treeFromTraversals preorder inorder =
....
Ok(createTree preorder inorder)
and
let rec createTree inorder preorder = ...