Search
⌘K

Leetcode 2342. Max Sum of a Pair With Equal Sum of Digits

Given an array of positive integers, find the maximum sum of two distinct elements whose digit sums are equal; if no such pair exists return -1. This reduces to grouping numbers by their digit-sum and taking the two largest values in each group to compute the maximum pair sum.


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.