1234567 input = [a......b]stack = []for i in input: while stack and stack[-1] ? i: stack.pop()? ?? stack.append(i) 赞微海报分享
近期评论