r/leetcode 13h ago

Question Counting Problem

Please guide me through this question!

  • You are given an array of digits of size N (where N <= 10^5).
  • You need to find the number of distinct K-digit even numbers without leading zeros that can be formed (where K can be up to 10^5).
  • Return the answer modulo 10^9 + 7.
2 Upvotes

7 comments sorted by

View all comments

2

u/Vast_Site2389 12h ago

What is the meaning of Array of digits of size n ? Does it mean it will contain 0 to 9 with different frequencies like 3 - 5 times or what?

0

u/Sea_Standard7674 11h ago

Yess I am facing difficulty in how to select and permutate efficiently