you give integer array num duplicate a maximum binary tree build recursively num follow algorithmCreate root node value maximum value numsrecursively build left subtree subarray prefix leave maximum valuerecursively build right subtree subarray suffix right maximum valuereturn maximum binary tree build num Example 1input num 321605output 635null20nullnull1explanation the recursive call follow the large value 321605 6 Left prefix 321 right suffix 05 the large value 321 3 Left prefix right suffix 21 empty array child the large value 21 2 Left prefix right suffix 1 empty array child only element child node value 1 the large value 05 5 Left prefix 0 right suffix only element child node value 0 empty array childexample 2input num 321output 3null2null1 Constraints1 numslength 10000 numsi 1000All integer num unique