Search
⌘K
Leetcode 3300. Minimum Element After Replacement With Digit Sum
Replace each number with the sum of its decimal digits and return the smallest resulting value. This is a simple linear scan computing digit-sums for each element and taking the minimum (O(n·d) time, constant extra space).
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.