Description
Solutions
Find Max Sum with Same First and Last Digit
🔥 FULLTIME

Given an array with integers, find the maximum sum of any 2 numbers whose first and last digits match.

E.g - [ 2, 36, 45, 306, 415] -> 36 + 306 < 45 + 415

Ans - 460

Example 1:

Input:  nums = [2, 36, 45, 306, 415]
Output: 460
Explanation:

The maximum sum of any 2 numbers whose first and last digits match is obtained by adding 45 and 415, which gives us 460.

Constraints:
    :)
Thumbnail 0
Testcase

Result
Case 1

input:

output: