Search
⌘K

Leetcode 2611. Mice and Cheese

Assign each of n cheeses to one of two mice so the first mouse eats exactly k items and the total reward (reward1 for first, reward2 for second) is maximized. The core challenge is selecting the k indices that maximize the net gain reward1[i]−reward2[i] (e.g., choose the k largest differences and sum appropriately).


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.