📜  python代码示例中的旋转循环队列

📅  最后修改于: 2022-03-11 14:46:15.557000             🧑  作者: Mango

代码示例1
def circularArrayRotation(a, k, queries):
    from collections import deque 
    items = deque(a) 
    items.rotate(k)
    ret_list = []
    for q in queries:
        #print(items[q])
        ret_list.append(items[q])
    return ret_list