标签:push style leetcode 技术 def div list pre array
题目描述:
提交:O(N)
class Solution: def buildArray(self, target: List[int], n: int) -> List[str]: res = [] a = "Push" b = "Pop" index = 1 for i in target: while index != i: res.append(a) res.append(b) index += 1 res.append(a) index += 1 return res
标签:push style leetcode 技术 def div list pre array
原文地址:https://www.cnblogs.com/oldby/p/12865398.html