Available question text
Count the number of assignments where each of n monkeys independently steps to a neighboring vertex (2^n total) that produce at least one collision; the key is combinatorics: only the two uniform directions are collision-free, so the answer is (2^n − 2) mod 1e9+7, computed with fast modular exponentiation for large n.
Related questions
Continue with questions that share topics or the same question type.
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 2550. Count Collisions of Monkeys on a Polygon
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source