Dota2 Senate

Medium · Queue & Deque · about 20 minutes

Asked at Amazon, Google, Microsoft.

Senators from two parties, Radiant ('R') and Dire ('D'), vote in rounds in the order given by senate. On their turn, a senator with voting rights bans one opponent senator's rights permanently. When all remaining senators belong to one party, that party wins. Everyone plays optimally (ban the next opponent in line). Return "Radiant" or "Dire".