Count Pairs of Numbers That Become Equal After at Most One Digit Swap
Company: Capital One
Role: Machine Learning Engineer
Category: Coding & Algorithms
Difficulty: hard
Interview Round: Technical Screen
Overview: Given a list of integers, count the index pairs whose values are equal or become equal after swapping two digits inside one of the two numbers, where leading zeros created by a swap are dropped. It tests digit manipulation, careful handling of numbers with different lengths, and hashing to avoid comparing every pair.
Read the full Capital One Machine Learning Engineer interview experience this question came from