Function to maximize the sum by swapping only one digit
function findMaxSum ( n1 , n2 ) { let arr1 = Array . from ( { length : MAX } , ( _ , i ) => 0 ) ; let arr2 = Array . from ( { length : MAX } , ( _ , i ) => 0 ) ; let l1 = 0 , l2 = 0 ; let max1 = Math . max ( n1 , n2 ) ; let min1 = Math . min ( n1 , n2 ) ;