Maximum Sum of Three Numbers Divisible by Three
Group the numbers by remainder mod 3, then only the top three of one group or one from each group can form a valid triple.
Group the numbers by remainder mod 3, then only the top three of one group or one from each group can form a valid triple.