Array
2342. Max Sum of a Pair With Equal Sum of Digits
Given nums, choose two distinct indices i, j such that the digit sums of nums[i] and nums[j] are equal, maximising nums[i] + nums[j]. Return −1 if no such pair exists. Group numbers by digit sum;…
Loading…