Maximum Sum with Same Maximum Digit Pair
Consider an array of integers nums, indexed starting from zero. Your task is to determine the maximum possible sum achievable by selecting a pair of numbers from nums. However, the selected pair must satisfy a unique condition: the maximum digit in both numbers of the pair must be identical.
If there exists no such pair satisfying the condition, print -1.
Ada AI
I want to discuss a solution
Help me solve this
Give more examples
What's wrong with my code?
How to use 'for loop' in javascript?
javascript (node 13.12.0)