< Previous Next > 1788. Maximize the Beauty of the Garden (Hard) Related Topics [Greedy] [Array] [Prefix Sum] Hints Hint 1 Consider every possible beauty and its first and last index in flowers. Hint 2 Remove all flowers with negative beauties within those indices.