标签:isp tac class ret self col end pop pen
class Solution: def IsPopOrder(self, pushV, popV): # write code here stack = [] for i in pushV: stack.append(i) while stack and stack[-1] == popV[0]: stack.pop() popV.pop(0) return True if not stack else False
标签:isp tac class ret self col end pop pen
原文地址:https://www.cnblogs.com/yqpy/p/9561307.html