You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
public TreeNode constructMaximumBinaryTree(int[] nums){
// this one is a little bit tricky.
/* In this questi on, we need to first select the maximum number and its index, then we seperate the list into to part and do same process recursively. */
return build(nums,0,nums.length-1);
}
private TreeNode build(int[] nums, int start, int end){