Company: Visa__
Difficulty: medium
Unique Index-Pairs Problem Description In the shadowy circuits of the hacker underworld, data isn't just stored, it's encoded with secrets. Among the lines of encrypted entries lies an array of codes (represented by positive integers), each one a digital fingerprint. Within this set, certain code-pairs appear nearly identical, save for a subtle corruption in a single digit. You've intercepted this array, and your mission is to uncover how many unique index-pairs (i, j) exist such that 0 <= i < j < codes.length, where the codes are exactly the same length, but differ in precisely one digit. Examples For codes = [404, 12, 504, 7, 414, 604, 700, 1], the output should be 5. Input: codes = [404, 12, 504, 7, 414, 604, 700, 1] Output: 5 Explanation: - codes[0] = 404 differs from codes[2] = 504 in the first digit. - codes[0] = 404 differs from codes[4] = 414 in the second digit. - codes[0] = 404 differs from codes[5] = 604 in the first digit. - codes[2] = 504 differs from codes[5] = 604 in the