Search
⌘K

Leetcode 2178. Maximum Split of Positive Even Integers

Given finalSum, produce a list of unique positive even integers that sum to finalSum and has the maximum possible count (or return empty if no such split exists). This is a constructive/greedy problem: maximize the number of terms by picking the smallest distinct even integers (2,4,6,...) until the remainder is too small, then adjust the last term.


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.