Search
⌘K

Leetcode 2376. Count Special Integers

Count how many positive integers ≤ n have all distinct digits; due to the bound up to 2×10^9, solve by combining combinatorics for full-length counts with a digit-DP/bounded-prefix counting to handle numbers with the same length as n.


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.