leetcode unique binary tree, try to implement permutation.