The approach is pretty easy to figure out. Using recursive function to construct the tree like building the BST. Here is my solution:

```
function findMaxIdx(nums, begin, end){
let ret = begin;
for(let i=begin+1; i<=end; i++){
if(nums[ret] < nums[i]){
ret = i;
}
}
return ret;
}
function createMaxBinaryTree(nums, begin, end){
if(begin > end){
return null;
}
let maxIdx = findMaxIdx(nums, begin, end);
let root = new TreeNode(nums[maxIdx]);
root.left = createMaxBinaryTree(nums, begin, maxIdx-1);
root.right = createMaxBinaryTree(nums, maxIdx+1, end);
return root;
}
var constructMaximumBinaryTree = function(nums) {
//special case
if(!nums || nums.length === 0){
return null;
}
return createMaxBinaryTree(nums, 0, nums.length-1);
};
```