Dota2 Senate
A cyclic row contains Radiant (R) and Dire (D) senators. Turns begin at seat 0 and follow input order cyclically, skipping banned seats. Each active senator…
A cyclic row contains Radiant (R) and Dire (D) senators. Turns begin at seat 0 and follow input order cyclically, skipping banned seats. Each active senator bans an active opponent on its turn; banned seats never act again. Every senator plays to make its party win. Return exactly Radiant or Dire when only one party remains. A party with fewer initial seats can still win.
1 <= senate.length <= 10000; only ASCII R and D. Return the exact party name, not a count or Boolean. Teaching traces contain at most 40 senators; coding retains the full bound.
Example 1: input senate = "DRR"; output Radiant. Dire bans one Radiant; the other Radiant bans Dire before its next turn.
Example 2: input senate = "RRDDD"; output Radiant. Two early Radiant turns remove two opponents, and the surviving Radiant later wins across a round boundary.
Category: Queues. Topic: queue. Difficulty: Medium. Patterns: linear-scan.