Need help with a combinatorics problem

Revision en1, by Codex49, 2024-01-26 05:28:01

Hi, this is Leetcode POTD. I am not looking for dp solution as there are plenty of those on leetcode. I was wondering if there's combinatorics solutions for this problem? More formally can this problem be solved for bigger constraints such as 1 <= m, n <= 1e5. If so, how can anyone provide an explanation?

Thank you for trying this problem.

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English Codex49 2024-01-26 05:28:01 495 Initial revision (published)