思路1 贪心,用队列来模拟投票

队列中的元素就是在senate中的索引。每下一轮时,就把索引加上长度push进队列,保证了相对位置的不变。

Last updated

Was this helpful?