题目描述:
自己的提交:
class Solution: def processQueries(self, queries: List[int], m: int) -> List[int]: l = [i for i in range(1,m+1)] ans = [] for i in queries: index = l.index(i) ans.append(index) l.remove(i) l.insert(0,i) return ans
原文地址:https://www.cnblogs.com/oldby/p/12687100.html
时间: 2024-10-29 18:23:16