Problem 654 · Medium

Maximum Binary Tree

Build a tree in which each node is the maximum of its range and the left and right subtrees come from the ranges on either side. The visual splits the array around the largest value and recurses on each part.

Open the interactive visualisation