Company: Autodesk_14oct
Difficulty: medium
Single Digit Difference Pairs Problem Description In the shadowy corners of the hacker underworld, data isn't just stored in an encrypted with secrets. Among the lines of encrypted entries lies an array of codes. Represented by positive integers, each one a digital fingerprint. Within this array, certain code pairs appear remarkably 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 i != j, codes[i] and codes[j] are exactly the same length, but differ in precisely one digit. Examples Example 1: Input: codes = [101, 12, 304, 7, 414, 604, 700, 1] Output: 5 Explanation: codes[0] = 101 differs from codes[2] = 304 in the first digit. codes[0] = 101 differs from codes[4] = 414 in the first digit. codes[1] = 12 differs from codes[5] = 604 in the third digit. codes[2] = 304 differs from codes[5] = 604 in the first digit. codes[3] = 7 differs from codes[7] = 1 in their only d