Solve RebuildBSTFromPostorder.