Free written solutionReducing Dishes (LeetCode 1402): Solution and Explanation
Each dish has a satisfaction value, and a dish cooked at time t is worth t times that value. You may drop dishes and cook the rest in any order. Return the largest total you can reach.
Read the intuition, approach, code and complexity →