Search
⌘K

Leetcode 654. Maximum Binary Tree

Given an array of distinct integers, construct the maximum binary tree by repeatedly choosing the maximum element as the root and recursively building the left and right subtrees from the subarrays left and right of that maximum. Constraints: 1 ≤ nums.length ≤ 1000 and all elements are unique.


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.