Company: Visa__
Difficulty: medium
Unique Index-Pairs In the shadowy circuits of the hacker underworld, data is not merely stored — it is encoded. You have intercepted an array codes of positive integers, each one a digital fingerprint. Some of these fingerprints are nearly identical: a single digit of one has been corrupted into another. Count the index pairs (i, j) with 0 <= i < j < codes.length such that the decimal forms of codes[i] and codes[j] have the same number of digits , and disagree in exactly one digit position. Two codes with different digit counts are never a match, no matter how similar they look. Two codes with equal digit counts are compared position by position, left to right. The count is over index pairs. Equal values sitting at different indices are still different entries of the array, so a value that repeats can take part in several pairs. Input Format A single line holding the array, written as comma-separated integers inside square brackets: [c1, c2, ..., cn] Output Format Print a sing