{"id":59071,"date":"2025-08-16T21:09:41","date_gmt":"2025-08-16T13:09:41","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/59071.html"},"modified":"2025-08-16T21:09:41","modified_gmt":"2025-08-16T13:09:41","slug":"leetcode%e7%ae%97%e6%b3%95%e5%88%b7%e9%a2%98%e7%9a%84%e7%ac%ac%e4%b9%9d%e5%a4%a9","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/59071.html","title":{"rendered":"leetcode\u7b97\u6cd5\u5237\u9898\u7684\u7b2c\u4e5d\u5929"},"content":{"rendered":"<p>\u4eca\u5929\u662f\u6808\u4e0e\u961f\u5217<\/p>\n<h2 style=\"background-color:transparent\">\u6808\u4e0e\u961f\u5217\u7684\u7406\u8bba\u57fa\u7840<\/h2>\n<p>1.\u539f\u7406\u5927\u5bb6\u5e94\u8be5\u90fd\u61c2&#xff0c;\u961f\u5217\u662f\u5148\u8fdb\u5148\u51fa&#xff0c;\u6808\u662f\u5148\u8fdb\u540e\u51fa\u3002<\/p>\n<p>2.\u5927\u5bb6\u8981\u77e5\u9053&#xff0c;\u6808\u548c\u961f\u5217\u90fd\u662fSTL&#xff08;c&#043;&#043;\u6807\u51c6\u5e93&#xff09;\u91cc\u9762\u7684\u4e24\u4e2a\u6570\u636e\u7ed3\u6784\u3002<\/p>\n<p>3.HP STL \u5176\u4ed6\u7248\u672c\u7684C&#043;&#043; STL&#xff0c;\u4e00\u822c\u662f\u4ee5HP STL\u4e3a\u84dd\u672c\u5b9e\u73b0\u51fa\u6765\u7684&#xff0c;HP STL\u662fC&#043;&#043; STL\u7684\u7b2c\u4e00\u4e2a\u5b9e\u73b0\u7248\u672c&#xff0c;\u800c\u4e14\u5f00\u653e\u6e90\u4ee3\u7801\u3002<\/p>\n<p>4.P.J.Plauger STL \u7531P.J.Plauger\u53c2\u7167HP STL\u5b9e\u73b0\u51fa\u6765\u7684&#xff0c;\u88abVisual C&#043;&#043;\u7f16\u8bd1\u5668\u6240\u91c7\u7528&#xff0c;\u4e0d\u662f\u5f00\u6e90\u7684\u3002<\/p>\n<p>5.SGI STL \u7531Silicon Graphics Computer Systems\u516c\u53f8\u53c2\u7167HP STL\u5b9e\u73b0&#xff0c;\u88abLinux\u7684C&#043;&#043;\u7f16\u8bd1\u5668GCC\u6240\u91c7\u7528&#xff0c;SGI STL\u662f\u5f00\u6e90\u8f6f\u4ef6&#xff0c;\u6e90\u7801\u53ef\u8bfb\u6027\u751a\u9ad8\u3002<\/p>\n<p>6.\u6808\u63d0\u4f9bpush\u548cpop\u7b49\u7b49\u63a5\u53e3&#xff0c;\u6240\u6709\u5143\u7d20\u5fc5\u987b\u7b26\u5408\u5148\u8fdb\u540e\u51fa\u89c4\u5219&#xff0c;\u6240\u4ee5\u6808\u4e0d\u63d0\u4f9b\u8d70\u8bbf\u529f\u80fd&#xff0c;\u4e5f\u4e0d\u63d0\u4f9b\u8fed\u4ee3\u5668&#xff0c;\u4e0d\u50cf\u662fset\u6216\u8005map\u63d0\u4f9b\u8fed\u4ee3\u5668iterator\u6765\u904d\u5386\u6240\u6709\u5143\u7d20\u3002<\/p>\n<p>7.&#xff0c;\u6808\u7684\u5e95\u5c42\u5b9e\u73b0\u53ef\u4ee5\u662fvector&#xff0c;deque&#xff0c;list \u90fd\u662f\u53ef\u4ee5\u7684&#xff0c; \u4e3b\u8981\u5c31\u662f\u6570\u7ec4\u548c\u94fe\u8868\u7684\u5e95\u5c42\u5b9e\u73b0\u3002<\/p>\n<p>8.\u961f\u5217\u4e2d\u5148\u8fdb\u5148\u51fa\u7684\u6570\u636e\u7ed3\u6784\u5417&#xff0c;\u540c\u6837\u4e0d\u5141\u8bb8\u6709\u904d\u5386\u884c\u4e3a&#xff0c;\u4e0d\u63d0\u4f9b\u8fed\u4ee3\u5668&#xff0c;\u4f46\u662f\u961f\u5217\u4e0d\u88ab\u5f52\u4e3a\u5bb9\u5668&#xff0c;\u800c\u88ab\u5f52\u4e3a\u5bb9\u5668\u9002\u914d\u5668\u3002<\/p>\n<h2 style=\"background-color:transparent\">leetcode 232.\u7528\u6808\u5b9e\u73b0\u961f\u5217<\/h2>\n<p>\u9898\u76ee\u94fe\u63a5<\/p>\n<p>class MyQueue {<br \/>\npublic:<br \/>\n    stack&lt;int&gt; stIn;<br \/>\n    stack&lt;int&gt; stOut;<\/p>\n<p>    MyQueue() {<\/p>\n<p>    }<\/p>\n<p>    void push(int x) {<br \/>\n        stIn.push(x);<br \/>\n    }<\/p>\n<p>    int pop() {<br \/>\n      \/\/\u53ea\u6709\u5f53stOut\u4e3a\u7a7a\u7684\u65f6\u5019&#xff0c;\u518d\u4ecestIn\u91cc\u5bfc\u5165\u6570\u636e<br \/>\n        if(stOut.empty()){<br \/>\n          \/\/\u4ecestIn\u5bfc\u5165\u6570\u636e\u77e5\u9053stIn\u4e3a\u7a7a<br \/>\n          while(!stIn.empty()){<br \/>\n            stOut.push(stIn.top());<br \/>\n            stIn.pop();<br \/>\n          }<br \/>\n        }<br \/>\n        int result&#061;stOut.top();<br \/>\n        stOut.pop();<br \/>\n        return result;<br \/>\n    }<\/p>\n<p>    int peek() {<br \/>\n        int result&#061;this-&gt;pop();\/\/\u76f4\u63a5\u8c03\u7528pop\u51fd\u6570<br \/>\n        stOut.push(result);\/\/\u56e0\u4e3apop\u51fd\u6570\u5f39\u51fa\u4e86\u5143\u7d20&#xff0c;\u6211\u4eec\u8fd8\u8981\u518d\u6dfb\u52a0\u56de\u53bb<br \/>\n        return result;<br \/>\n    }<\/p>\n<p>    bool empty() {<br \/>\n        return stIn.empty()&amp;&amp;stOut.empty();<br \/>\n    }<br \/>\n};<\/p>\n<p>\/**<br \/>\n * Your MyQueue object will be instantiated and called as such:<br \/>\n * MyQueue* obj &#061; new MyQueue();<br \/>\n * obj-&gt;push(x);<br \/>\n * int param_2 &#061; obj-&gt;pop();<br \/>\n * int param_3 &#061; obj-&gt;peek();<br \/>\n * bool param_4 &#061; obj-&gt;empty();<br \/>\n *\/ <\/p>\n<p>\u601d\u8def\u603b\u7ed3&#xff1a;\u8fd9\u9053\u9898\u7684\u5173\u952e\u5728\u4e8e\u6211\u4eec\u5982\u4f55\u7528\u6808\u6765\u5b9e\u73b0\u961f\u5217\u7684\u529f\u80fd\u51fd\u6570\u3002\u5176\u5b9e\u5c31\u662f\u7528\u4e24\u4e2a\u6808&#xff0c;\u4e00\u4e2a\u8f93\u5165\u6808&#xff0c;\u4e00\u4e2a\u8f93\u51fa\u6808\u3002\u5728push\u6570\u636e\u7684\u65f6\u5019&#xff0c;\u53ea\u8981\u6570\u636e\u653e\u8fdb\u8f93\u5165\u6808\u5c31\u597d&#xff0c;\u4f46\u5728pop\u7684\u65f6\u5019&#xff0c;\u64cd\u4f5c\u5c31\u590d\u6742\u4e00\u4e9b&#xff0c;\u8f93\u51fa\u6808\u5982\u679c\u4e3a\u7a7a&#xff0c;\u5c31\u628a\u8fdb\u6808\u6570\u636e\u5168\u90e8\u5bfc\u5165\u8fdb\u6765&#xff08;\u6ce8\u610f\u662f\u5168\u90e8\u5bfc\u5165&#xff09;&#xff0c;\u518d\u4ece\u51fa\u6808\u5f39\u51fa\u6570\u636e&#xff0c;\u5982\u679c\u8f93\u51fa\u6808\u4e0d\u4e3a\u7a7a&#xff0c;\u5219\u76f4\u63a5\u4ece\u51fa\u6808\u5f39\u51fa\u6570\u636e\u5c31\u53ef\u4ee5\u4e86\u3002\u5728\u4ee3\u7801\u5b9e\u73b0\u7684\u65f6\u5019&#xff0c;\u4f1a\u53d1\u73b0pop() \u548c peek()\u4e24\u4e2a\u51fd\u6570\u529f\u80fd\u7c7b\u4f3c&#xff0c;\u4ee3\u7801\u5b9e\u73b0\u4e0a\u4e5f\u662f\u7c7b\u4f3c\u7684\u3002\u5982\u679c\u8fdb\u6808\u548c\u51fa\u6808\u90fd\u4e3a\u7a7a\u7684\u8bdd&#xff0c;\u8bf4\u660e\u6a21\u62df\u7684\u961f\u5217\u4e3a\u7a7a\u4e86\u3002<\/p>\n<h2 style=\"background-color:transparent\">leetcode 225.\u7528\u961f\u5217\u5b9e\u73b0\u6808<\/h2>\n<p>\u8fd9\u9053\u9898\u5927\u5bb6\u53ef\u80fd\u4f1a\u60ef\u6027\u601d\u7ef4&#xff0c;\u4ee5\u4e3a\u8fd8\u8981\u7528\u4e24\u4e2a\u961f\u5217\u6765\u6a21\u62df\u6808&#xff0c;\u5176\u5b9e\u53ea\u8981\u7528\u4e00\u4e2a\u961f\u5217\u5c31\u53ef\u4ee5\u4e86\u3002<\/p>\n<p>\u5e76\u4e14\u8fd9\u9053\u9898\u7528\u4e00\u4e2a\u961f\u5217\u6765\u6a21\u62df\u4e5f\u662f\u6bd4\u8f83\u7b80\u5355\u7684&#xff0c;\u751a\u81f3\u6bd4\u7528\u4e24\u4e2a\u961f\u5217\u8fd8\u7b80\u5355\u3002<\/p>\n<p>\u9898\u76ee\u94fe\u63a5<\/p>\n<p>class MyStack {<br \/>\npublic:<br \/>\n    queue&lt;int&gt; que;<br \/>\n    MyStack() {<\/p>\n<p>    }<\/p>\n<p>    void push(int x) {<br \/>\n        que.push(x);\/\/\u76f4\u63a5\u63d2\u5165\u5c31\u597d\u4e86<br \/>\n    }<\/p>\n<p>    int pop() {<br \/>\n        int size&#061;que.size();<br \/>\n        size&#8211;;<br \/>\n        while(size&#8211;){\/\/\u5faa\u73af\u63d2\u5165\u961f\u5217\u5934\u90e8\u7684\u6570\u503c<br \/>\n          que.push(que.front());<br \/>\n          que.pop();<br \/>\n        }<br \/>\n        int result&#061;que.front();\/\/\u8fd9\u91cc\u53ea\u662f\u53d6\u5230\u4e86\u6570\u503c&#xff0c;\u4f46\u662f\u8fd8\u6ca1\u5f39\u51fa\u6765<br \/>\n        que.pop();\/\/\u6240\u4ee5\u8981\u5f39\u51fa<br \/>\n        return result;<br \/>\n    }<\/p>\n<p>    int top() {<br \/>\n        return que.back();\/\/\u6808\u7684\u5934\u90e8\u5176\u5b9e\u5c31\u662f\u961f\u5217\u7684\u5c3e\u90e8&#xff0c;\u76f4\u63a5return\u5c31\u597d\u4e86<br \/>\n    }<\/p>\n<p>    bool empty() {<br \/>\n        return que.empty();<br \/>\n    }<br \/>\n};<\/p>\n<p>\/**<br \/>\n * Your MyStack object will be instantiated and called as such:<br \/>\n * MyStack* obj &#061; new MyStack();<br \/>\n * obj-&gt;push(x);<br \/>\n * int param_2 &#061; obj-&gt;pop();<br \/>\n * int param_3 &#061; obj-&gt;top();<br \/>\n * bool param_4 &#061; obj-&gt;empty();<br \/>\n *\/ <\/p>\n<p>\u601d\u8def\u603b\u7ed3&#xff1a;\u8fd9\u9053\u9898\u7684\u5173\u952e\u5728\u4e8e&#xff0c;\u8981\u6df1\u523b\u7406\u89e3\u6808\u548c\u961f\u5217\u7684\u5e95\u5c42\u5b9e\u73b0\u539f\u7406&#xff0c;\u5e76\u4e14\u78b0\u5230\u8fd9\u79cd\u6570\u636e\u7ed3\u6784\u7684\u9898\u76ee\u6700\u597d\u662f\u80fd\u591f\u81ea\u5df1\u753b\u51fa\u4e00\u5f20\u56fe\u51fa\u6765&#xff0c;\u8fd9\u6837\u66f4\u597d\u7406\u89e3\u3002<\/p>\n<h2 style=\"background-color:transparent\">leetcode 20.\u6709\u6548\u7684\u62ec\u53f7<\/h2>\n<p>\u9898\u76ee\u94fe\u63a5<\/p>\n<p>\u62ec\u53f7\u5339\u914d\u662f\u7528\u6808\u6765\u89e3\u51b3\u7684\u7ecf\u5178\u95ee\u9898\u3002\u7531\u4e8e\u6808\u7684\u7279\u6b8a\u6027&#xff0c;\u975e\u5e38\u9002\u5408\u505a\u5bf9\u79f0\u5339\u914d\u7c7b\u578b\u7684\u9898\u76ee\u3002<\/p>\n<p>class Solution {<br \/>\npublic:<br \/>\n    bool isValid(string s) {<br \/>\n        stack&lt;int&gt; st;<br \/>\n        if(s.size()%2!&#061;0) return false;\/\/\u5982\u679cs\u7684\u957f\u5ea6\u4e3a\u5947\u6570&#xff0c;\u4e00\u5b9a\u4e0d\u7b26\u5408\u6761\u4ef6<br \/>\n        for(int i&#061;0;i&lt;s.size();i&#043;&#043;){<br \/>\n          if(s[i]&#061;&#061;&#039;(&#039;) st.push(&#039;)&#039;);<br \/>\n          else if(s[i]&#061;&#061;&#039;[&#039;) st.push(&#039;]&#039;);<br \/>\n          else if(s[i]&#061;&#061;&#039;{&#039;) st.push(&#039;}&#039;);<br \/>\n           \/\/ \u7b2c\u4e09\u79cd\u60c5\u51b5&#xff1a;\u904d\u5386\u5b57\u7b26\u4e32\u5339\u914d\u7684\u8fc7\u7a0b\u4e2d&#xff0c;\u6808\u5df2\u7ecf\u4e3a\u7a7a\u4e86&#xff0c;\u6ca1\u6709\u5339\u914d\u7684\u5b57\u7b26\u4e86&#xff0c;\u8bf4\u660e\u53f3\u62ec\u53f7\u6ca1\u6709\u627e\u5230\u5bf9\u5e94\u7684\u5de6\u62ec\u53f7 return false<br \/>\n            \/\/ \u7b2c\u4e8c\u79cd\u60c5\u51b5&#xff1a;\u904d\u5386\u5b57\u7b26\u4e32\u5339\u914d\u7684\u8fc7\u7a0b\u4e2d&#xff0c;\u53d1\u73b0\u6808\u91cc\u6ca1\u6709\u6211\u4eec\u8981\u5339\u914d\u7684\u5b57\u7b26\u3002\u6240\u4ee5return false<br \/>\n          else if(st.empty()||st.top()!&#061;s[i]) return false;<br \/>\n          else st.pop();<br \/>\n        }<br \/>\n         \/\/ \u7b2c\u4e00\u79cd\u60c5\u51b5&#xff1a;\u6b64\u65f6\u6211\u4eec\u5df2\u7ecf\u904d\u5386\u5b8c\u4e86\u5b57\u7b26\u4e32&#xff0c;\u4f46\u662f\u6808\u4e0d\u4e3a\u7a7a&#xff0c;\u8bf4\u660e\u6709\u76f8\u5e94\u7684\u5de6\u62ec\u53f7\u6ca1\u6709\u53f3\u62ec\u53f7\u6765\u5339\u914d&#xff0c;\u6240\u4ee5return false&#xff0c;\u5426\u5219\u5c31return true<br \/>\n        if(st.empty()) return true;<br \/>\n        else return false;<br \/>\n    }<br \/>\n}; <\/p>\n<p>\u601d\u8def\u603b\u7ed3&#xff1a;\u4ee5\u4e0a\u4ee3\u7801\u4e2d\u7684\u6ce8\u91ca\u4e2d&#xff0c;\u6709\u5206\u522b\u5bf9\u5e94\u6839\u636e\u9898\u610f\u7684\u4e09\u79cd\u6761\u4ef6&#xff0c;\u5c31\u662f\u53d1\u73b0\u4efb\u610f\u4e00\u79cd\u62ec\u53f7&#xff0c;\u5c31\u5f80\u6808\u91cc\u9762\u63d2\u5165\u5bf9\u5e94\u7684\u62ec\u53f7&#xff0c;\u7136\u540e\u9047\u5230\u7ee7\u7eed\u904d\u5386\u5b57\u7b26\u4e32&#xff0c;\u9047\u5230\u5bf9\u5e94\u7684\u62ec\u53f7&#xff0c;\u5982\u679c\u548c\u6808\u91cc\u9762\u9876\u90e8\u7684\u62ec\u53f7\u76f8\u7b49&#xff0c;\u5c31pop\u51fa\u6765&#xff0c;\u7136\u540e\u7ee7\u7eed\u8fdb\u884c\u6bd4\u8f83\u3002\u6280\u5de7\u6027\u7684\u4e1c\u897f\u6ca1\u6709\u56fa\u5b9a\u7684\u5b66\u4e60\u65b9\u6cd5&#xff0c;\u8fd8\u662f\u8981\u591a\u770b\u591a\u7ec3&#xff0c;\u81ea\u5df1\u7075\u6d3b\u8fd0\u7528\u4e86\u3002<\/p>\n<h2 style=\"background-color:transparent\">leetcode 1047.\u5220\u9664\u5b57\u7b26\u4e32\u4e2d\u7684\u6240\u6709\u76f8\u90bb\u91cd\u590d\u9879<\/h2>\n<p>\u9898\u76ee\u94fe\u63a5<\/p>\n<p>\u8fd9\u9053\u9898\u4e5f\u662f\u6808\u7684\u7ecf\u5178\u5e94\u7528\u3002\u5927\u6982\u7684\u610f\u601d\u6709\u70b9\u50cf\u5f00\u5fc3\u6d88\u6d88\u4e50\u3002<\/p>\n<p>class Solution {<br \/>\npublic:<br \/>\n    string removeDuplicates(string s) {<br \/>\n        stack&lt;int&gt; st;<br \/>\n        for(int i&#061;0;i&lt;s.size();i&#043;&#043;){<br \/>\n          if(st.empty()||st.top()!&#061;s[i]){<br \/>\n            st.push(s[i]);<br \/>\n          }<br \/>\n          else{<br \/>\n            st.pop();\/\/s\u4e0est.top()\u76f8\u7b49\u7684\u60c5\u51b5<br \/>\n          }<br \/>\n        }<br \/>\n        string result&#061;&#034;&#034;;<br \/>\n        while(!st.empty()){\/\/\u628a\u6808\u4e2d\u7684\u5143\u7d20\u653e\u5230result\u5b57\u7b26\u4e32\u4e2d<br \/>\n          result&#043;&#061;st.top();<br \/>\n          st.pop();<br \/>\n        }<br \/>\n        reverse(result.begin(),result.end());\/\/\u6700\u540e\u8981\u628a\u5b57\u7b26\u4e32\u53cd\u8f6c\u4e00\u4e0b<br \/>\n        return result;<br \/>\n    }<br \/>\n}; <\/p>\n<p>\u601d\u8def\u603b\u7ed3&#xff1a;\u5927\u5bb6\u5982\u679c\u6709\u6761\u4ef6\u53ef\u4ee5\u753b\u4e2a\u56fe&#xff0c;\u9047\u5230\u8fd9\u79cd\u6570\u636e\u7ed3\u6784\u7684\u9898\u76ee&#xff0c;\u4e00\u5b9a\u8981\u591a\u753b\u56fe&#xff0c;\u8fd9\u6837\u80fd\u591f\u66f4\u597d\u5730\u7406\u89e3&#xff0c;\u5149\u51ed\u7a7a\u60f3\u7684\u8bdd\u5f88\u96be\u60f3\u5f97\u5230\u3002\u601d\u8def\u5c31\u662f\u5148\u628a\u5b57\u7b26\u4e32\u653e\u5230\u6808\u91cc\u9762&#xff0c;\u7136\u540e\u770b\u60c5\u51b5\u6d88\u6d88\u4e50&#xff0c;\u5176\u6b21\u518d\u628a\u6808\u7684\u4e2d\u5143\u7d20\u62fc\u6210\u4e00\u4e2a\u5b57\u7b26\u4e32&#xff0c;\u6700\u540e\u518d\u628a\u8fd9\u4e2a\u5b57\u7b26\u4e32\u53cd\u8f6c\u4e00\u4e0b\u5c31\u5b8c\u6210\u4e86\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb506\u6b21\uff0c\u70b9\u8d5e5\u6b21\uff0c\u6536\u85cf12\u6b21\u3002\u4eca\u5929\u662f\u6808\u4e0e\u961f\u5217\u3002<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[55,2692,1813,6245,427,925,3647],"topic":[],"class_list":["post-59071","post","type-post","status-publish","format-standard","hentry","category-server","tag-c","tag-leetcode","tag-1813","tag-6245","tag-427","tag-925","tag-3647"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>leetcode\u7b97\u6cd5\u5237\u9898\u7684\u7b2c\u4e5d\u5929 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/59071.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"leetcode\u7b97\u6cd5\u5237\u9898\u7684\u7b2c\u4e5d\u5929 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb506\u6b21\uff0c\u70b9\u8d5e5\u6b21\uff0c\u6536\u85cf12\u6b21\u3002\u4eca\u5929\u662f\u6808\u4e0e\u961f\u5217\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/59071.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-08-16T13:09:41+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/59071.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/59071.html\",\"name\":\"leetcode\u7b97\u6cd5\u5237\u9898\u7684\u7b2c\u4e5d\u5929 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-08-16T13:09:41+00:00\",\"dateModified\":\"2025-08-16T13:09:41+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/59071.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/59071.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/59071.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"leetcode\u7b97\u6cd5\u5237\u9898\u7684\u7b2c\u4e5d\u5929\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"leetcode\u7b97\u6cd5\u5237\u9898\u7684\u7b2c\u4e5d\u5929 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/59071.html","og_locale":"zh_CN","og_type":"article","og_title":"leetcode\u7b97\u6cd5\u5237\u9898\u7684\u7b2c\u4e5d\u5929 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb506\u6b21\uff0c\u70b9\u8d5e5\u6b21\uff0c\u6536\u85cf12\u6b21\u3002\u4eca\u5929\u662f\u6808\u4e0e\u961f\u5217\u3002","og_url":"https:\/\/www.wsisp.com\/helps\/59071.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-08-16T13:09:41+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"3 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/59071.html","url":"https:\/\/www.wsisp.com\/helps\/59071.html","name":"leetcode\u7b97\u6cd5\u5237\u9898\u7684\u7b2c\u4e5d\u5929 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-08-16T13:09:41+00:00","dateModified":"2025-08-16T13:09:41+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/59071.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/59071.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/59071.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"leetcode\u7b97\u6cd5\u5237\u9898\u7684\u7b2c\u4e5d\u5929"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/59071","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=59071"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/59071\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=59071"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=59071"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=59071"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=59071"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}