Search
⌘K

Leetcode 3320. Count The Number of Winning Sequences

Given Alice's fixed length-n sequence of moves in a rock-paper-scissors cycle (F beats E, W beats F, E beats W), count how many length-n sequences Bob can play (never repeating the same creature in consecutive rounds) that give Bob a strictly higher total score than Alice, modulo 1e9+7. The core challenge is counting constrained sequences, typically solved by dynamic programming that tracks the round index, Bob's last move, and the running score difference.


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.