
654. Maximum Binary Tree
·
Algorithm
Maximum Binary Tree - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 중복된 값이 없는 정수로 구성된 list가 주어진다. 이 list를 이용해서 아래 조건에 부합하는 tree를 만들어 root를 반환하는 문제다. 1. Create a root node whose value is the maximum value in nums. 2. Recursively build the left subtree on the subarray prefix to the..