題目鏈接https://leetcode.com/problems/valid-parentheses/description/ 思路:建一個棧,當s[i]與stack[-1]是一對兒時,彈出。最后棧為空,就是true