[LeetCode] Maximum Total Beauty of the Gardens

1 · · April 10, 2022, 12:34 p.m.
2234. Maximum Total Beauty of the Gardens Alice is a caretaker of n gardens and she wants to plant flowers to maximize the total beauty of all her gardens. You are given a 0-indexed integer array flowers of size n, where flowers[i] is the number of flowers already planted in the ith garden. Flowers that are already planted cannot be removed. You are then given another integer newFlowers, which is the maximum number of flowers that Alice can additionally plant. You are also given the integers ta...