摘要:
class Solution { public: int longestValidParentheses(string s) { int res = 0, start = 0; stack<int> m; for (int i = 0; i < s.size(); ++i) { if (s[i] = 阅读全文
摘要:
class Solution { public: void nextPermutation(vector<int> &num) { int i, j, n = num.size(); for (i = n - 2; i >= 0; --i) { if (num[i + 1] > num[i]) { 阅读全文