Sponsored
Use these hints if you're stuck. Try solving on your own first.
What is the largest possible sum of digits a number can have?
Group the array elements by the sum of their digits, and find the largest two elements of each group.
Solve with full IDE support and test cases