有比这更快的合并两个双端队列的方法吗?
请注意,我不关心保留输入deque,我只关心尽快获得合并后的deque。
# a, b are two deques. The maximum length
# of a is greater than the current length
# of a plus the current length of b
while len(b):
a.append(b.popleft())
请注意,我不关心保留输入deque,我只关心尽快获得合并后的deque。