{"id":115575,"date":"2026-10-12T17:17:08","date_gmt":"2026-10-12T09:17:08","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/115575.html"},"modified":"2026-10-12T17:17:08","modified_gmt":"2026-10-12T09:17:08","slug":"leetcode%e9%a2%98%e5%ba%93%e7%ac%ac3%e9%a2%98-%e6%97%a0%e9%87%8d%e5%a4%8d%e9%95%bf%e5%ba%a6%e7%9a%84%e6%9c%80%e9%95%bf%e5%ad%90%e4%b8%b2","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/115575.html","title":{"rendered":"Leetcode\u9898\u5e93\u7b2c3\u9898 \u65e0\u91cd\u590d\u957f\u5ea6\u7684\u6700\u957f\u5b50\u4e32"},"content":{"rendered":"<p>\u9898\u76ee\u6982\u8981&#xff1a;<\/p>\n<p style=\"text-align:center\"><img decoding=\"async\" alt=\"\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/10\/20261012091701-6acca58db5aac.jpg\" \/><\/p>\n<p>\u9898\u76ee\u53d9\u8ff0\u8fd8\u662f\u5f88\u6e05\u695a\u7684&#xff0c;\u8981\u6c42\u6211\u4eec\u627e\u51fa\u5b57\u7b26\u4e32\u4e2d\u7684\u4e00\u4e2a\u5b50\u4e32&#xff0c;\u8fd9\u4e2a\u5b50\u4e32\u7684\u6ca1\u6709\u91cd\u590d\u5b57\u7b26&#xff0c;\u800c\u4e14\u6bd4\u8fd9\u4e2a\u5b50\u4e32\u957f\u5ea6\u8fd8\u957f\u7684\u5b50\u4e32\u5fc5\u5b9a\u6709\u91cd\u590d\u51fa\u73b0\u7684\u5b57\u7b26\u3002<\/p>\n<p>\u4e00\u5f00\u59cb\u6211\u60f3\u5230\u7684\u662f\u201c\u6ed1\u52a8\u7a97\u53e3\u201d&#xff0c;\u7a97\u53e3\u957f\u5ea6\u4ece2\u5f00\u59cb\u9010\u6b65\u589e\u52a0\u5230\u5b57\u7b26\u4e32\u672c\u8eab\u7684\u957f\u5ea6&#xff0c;\u7a97\u53e3\u4e00\u6b21\u79fb\u52a8\u4e00\u683c&#xff0c;\u5982\u679c\u5f53\u524d\u7a97\u53e3\u6ca1\u6709\u68c0\u6d4b\u5230\u91cd\u590d\u5b57\u7b26&#xff0c;\u8bf4\u660e\u8fd9\u4e2a\u957f\u5ea6\u662f\u53ef\u884c\u7684&#xff0c;\u7a97\u53e3\u957f\u5ea6\u52a01&#xff0c;\u5982\u679c\u68c0\u6d4b\u5230\u91cd\u590d\u5b57\u7b26&#xff0c;\u7a97\u53e3\u79fb\u4e00\u683c\u518d\u68c0\u6d4b&#xff0c;\u4e00\u76f4\u505a\u4e0b\u53bb&#xff0c;\u76f4\u5230\u7a97\u53e3\u957f\u5ea6\u5230\u6700\u5927&#xff08;\u7b54\u6848\u5c31\u662flen(str)&#xff09;\u6216\u5f53\u524d\u7a97\u53e3\u5df2\u7ecf\u6ed1\u5230\u672b\u5c3e\u4e86\u8fd8\u662f\u6709\u91cd\u590d\u5b57\u7b26&#xff0c;\u5219\u7b54\u6848\u5c31\u662f\u7a97\u53e3\u957f\u5ea6\u51cf1\u3002\u6211\u4e00\u5f00\u59cb\u60f3\u7684\u53cd\u6389\u4e86\u3002<\/p>\n<p style=\"text-align:center\"><img decoding=\"async\" alt=\"\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/10\/20261012091703-6acca58f309f9.jpg\" \/><\/p>\n<p>\u8fd9\u4e2a\u601d\u8def\u662f\u6b63\u786e\u7684&#xff0c;\u5176\u5b9e\u5c31\u662f\u66b4\u529b\u6cd5&#xff0c;\u4e00\u4e2a\u4e2a\u5b50\u4e32\u90fd\u53bb\u8bd5&#xff0c;\u539f\u59cb\u65b9\u6cd5\u7684\u4ee3\u7801\u662f\u8fd9\u6837\u7684&#xff1a;<\/p>\n<p>class Solution {<br \/>\npublic:<br \/>\n    int lengthOfLongestSubstring(string s) {<\/p>\n<p>        int n &#061; s.size();<br \/>\n        if(n &lt;&#061; 1) return n; \/\/\u5b57\u7b26\u4e32\u957f\u5ea6\u4e3a1\u76f4\u63a5\u8fd4\u56de<br \/>\n        \/\/\u4ece\u7a97\u53e3\u957f\u5ea6\u4e3a2\u5f00\u59cb\u8bd5&#xff0c;\u76f4\u5230\u7a97\u53e3\u957f\u5ea6\u4e3a\u6574\u4e2a\u5b57\u7b26\u4e32\u7684\u957f\u5ea6n<br \/>\n        for(int len &#061; 2; len &lt;&#061; n; len&#043;&#043;){<br \/>\n            bool found &#061; false;<\/p>\n<p>            \/\/\u6ed1\u52a8\u7a97\u53e3&#xff0c;\u7a97\u53e3\u7684\u8d77\u59cb\u4f4d\u7f6e\u4e3a0&#xff0c;1&#xff0c;2&#8230;&#xff0c;\u8d77\u59cb\u4f4d\u7f6e\u6700\u591a\u5230n-1-(len-1)<br \/>\n            for(int start &#061; 0; start &lt;&#061; n-len; start&#043;&#043;){<br \/>\n                bool hasDup &#061; false; \/\/\u786e\u5b9a\u8be5\u7a97\u53e3\u6709\u65e0\u91cd\u590d\u5b57\u7b26<br \/>\n                for(int i &#061; start; i &lt; start &#043; len; i&#043;&#043;){<br \/>\n                    for(int j &#061; i &#043; 1; j &lt; start &#043; len; j&#043;&#043;){<br \/>\n                        if(s[i] &#061;&#061; s[j]){<br \/>\n                            hasDup &#061; true;<br \/>\n                            break;<br \/>\n                        }<br \/>\n                    }<br \/>\n                }<br \/>\n                \/\/\u53ea\u8981\u5f53\u524d\u7a97\u53e3\u65e0\u91cd\u590d\u5b57\u7b26&#xff0c;\u8bf4\u660e\u8fd9\u4e2a\u957f\u5ea6len\u53ef\u884c<br \/>\n                if(hasDup &#061;&#061; false){<br \/>\n                    found &#061; true;<br \/>\n                    break;<br \/>\n                }<br \/>\n            }<\/p>\n<p>            \/\/\u5f53\u524d\u957f\u5ea6\u4e0d\u53ef\u884c&#xff0c;\u7b54\u6848\u5c31\u662f\u4e0a\u4e00\u4e2a\u957f\u5ea6<br \/>\n            if(found &#061;&#061; false){<br \/>\n                return len &#8211; 1;<br \/>\n            }<br \/>\n        }<br \/>\n        return n; \/\/\u5982\u679clen\u90fd\u904d\u5386\u5b8c\u4e86&#xff0c;\u90a3\u7b54\u6848\u5c31\u662f\u6574\u4e2a\u5b57\u7b26\u4e32\u7684\u957f\u5ea6<\/p>\n<p>    }<br \/>\n};<\/p>\n<p>\u539f\u59cb\u65b9\u6cd5\u867d\u7136\u7b80\u5355&#xff0c;\u5199\u8d77\u6765\u548c\u7406\u89e3\u8d77\u6765\u8fd8\u662f\u633a\u8d39\u52b2\u7684&#xff0c;\u8fd9\u6709\u56db\u5c42\u5faa\u73af&#xff0c;\u524d\u4e24\u5c42\u662f\u786e\u5b9a\u7a97\u53e3\u957f\u5ea6\u4ee5\u53ca\u79fb\u52a8\u7a97\u53e3&#xff0c;\u91cc\u9762\u4e24\u5c42\u662f\u7528\u6765\u6bd4\u8f83\u8fd9\u4e2a\u7a97\u53e3\u662f\u5426\u6709\u5b57\u7b26\u91cd\u590d\u3002<\/p>\n<p>\u4e0d\u51fa\u6211\u6240\u6599&#xff0c;\u4e5f\u4e0d\u51faKimi\u6240\u6599&#xff0c;\u4ee3\u7801\u5728\u8fd0\u884c\u5230\u5012\u6570\u7b2c\u4e8c\u4e2a\u6d4b\u8bd5\u7528\u4f8b\u8d85\u65f6\u4e86<\/p>\n<p style=\"text-align:center\"><img decoding=\"async\" alt=\"\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/10\/20261012091703-6acca58fdc4da.png\" \/><\/p>\n<p>\u4f18\u5316\u601d\u8def\u4f9d\u65e7\u662f\u7a7a\u95f4\u6362\u65f6\u95f4&#xff0c;\u8fd9\u4e2a\u7a97\u53e3\u4e0d\u5fc5\u8981\u9010\u4e00\u6ed1\u52a8\u5e76\u91cd\u7f6e&#xff0c;\u800c\u662f\u53ef\u4ee5\u201c\u8df3\u53d8\u201d\u7684\u3002Kimi\u53c8\u53d1\u6325\u51fa\u4e86\u5b83\u60ca\u4eba\u7684\u5929\u8d4b\u3002\u56fe\u89e3\u5982\u4e0b&#xff1a;<\/p>\n<p style=\"text-align:center\"><img decoding=\"async\" alt=\"\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/10\/20261012091704-6acca590a062f.jpg\" \/><\/p>\n<p>R\u7684\u4f4d\u7f6e\u662f\u4e00\u76f4\u9012\u589e\u7684&#xff0c;L\u4e0eR\u4e4b\u95f4\u7a97\u53e3\u4e2d\u7684\u5b57\u7b26\u7528\u4e00\u4e2a\u5b57\u5178\u8bb0\u5f55\u5b83\u6700\u540e\u4e00\u6b21\u5728\u7a97\u53e3\u4e2d\u51fa\u73b0\u7684\u4f4d\u7f6e&#xff0c;\u7531\u4e8eR\u662f\u4ece0\u5f00\u59cb\u79fb\u52a8\u7684&#xff0c;\u6211\u4eec\u5b9e\u65f6\u66f4\u65b0\u5b57\u5178\u5176\u5b9e\u5c31\u662f\u8bb0\u5f55R\u6307\u9488\u6240\u5728\u7684\u5b57\u7b26\u662f\u5426\u9700\u8981\u66f4\u65b0&#xff0c;\u68c0\u6d4b\u7684\u4e5f\u662fR\u4f4d\u7f6e\u6240\u5728\u7684\u5b57\u7b26\u662f\u5426\u51fa\u73b0\u91cd\u590d\u3002<\/p>\n<p>L\u6307\u9488\u5728\u68c0\u6d4b\u5230\u91cd\u590d\u5b57\u7b26\u65f6\u8981\u4e48\u4e0d\u52a8&#xff0c;\u8981\u4e48\u79fb\u52a8\u5230 \u5b57\u5178\u8bb0\u5f55\u7684 R\u6307\u9488\u6240\u5728\u5b57\u7b26\u00a0\u7684 \u4e0b\u4e00\u4e2a\u4f4d\u7f6e&#xff0c;\u5982\u4f55\u79fb\u52a8\u5c31\u53d6\u8f83\u5927\u8005\u3002\u8fd9\u6837\u505a\u7684\u539f\u56e0\u662f\u5f53\u524d\u7a97\u53e3\u6700\u53f3\u4fa7\u5b57\u7b26\u5982\u679c\u662f\u91cd\u590d\u51fa\u73b0\u7684\u8bdd&#xff0c;\u7a97\u53e3\u7684\u5de6\u8fb9\u754c\u7edd\u4e0d\u53ef\u80fd\u66f4\u9760\u5de6\u3002<\/p>\n<p>\u4e0b\u9762\u662f\u4ee3\u7801&#xff0c;\u7528\u7684\u662f\u6570\u7ec4\u5f0f\u7684\u4f2a\u54c8\u5e0c\u8868&#xff0c;ASCII\u5b57\u7b26\u6709128\u79cd&#xff0c;\u6570\u7ec4\u7b2c\u4e00\u7ef4\u957f\u5ea6\u4e3a128&#xff0c;\u8fd9\u6837\u505a\u53ef\u4ee5\u5feb\u4e00\u70b9\u3002<\/p>\n<p>class Solution {<br \/>\npublic:<br \/>\n    int lengthOfLongestSubstring(string s) {<\/p>\n<p>        vector&lt;int&gt; last(128,-1);  \/\/\u8bb0\u5f55\u6bcf\u4e00\u79cd\u5b57\u7b26\u6700\u540e\u4e00\u6b21\u51fa\u73b0\u7684\u4f4d\u7f6e&#xff0c;-1\u8868\u793a\u672a\u51fa\u73b0\u8fc7<br \/>\n        int left &#061; 0;<br \/>\n        int maxLen &#061; 0;<br \/>\n        for(int right &#061; 0; right &lt; s.size(); right&#043;&#043;){<br \/>\n            char ch &#061; s[right];<br \/>\n            \/\/\u5982\u679c\u5b57\u7b26\u51fa\u73b0\u8fc7&#xff0c;\u4e14\u5927\u4e8eleft&#xff0c;left\u8df3\u53d8&#xff0c;\u5408\u8d77\u6765\u5c31\u662f&#xff1a;<br \/>\n            if(last[ch] &gt;&#061; left){  \/\/\u8fd9\u91cc\u662f\u5927\u4e8e\u7b49\u4e8e<br \/>\n                left&#061; last[ch] &#043; 1;<br \/>\n            }<br \/>\n            last[ch] &#061; right;   \/\/\u5b9e\u65f6\u66f4\u65b0last<br \/>\n            maxLen &#061; max(maxLen, right &#8211; left &#043; 1); \/\/\u5b9e\u65f6\u66f4\u65b0maxLen<br \/>\n        }<br \/>\n        return maxLen;<br \/>\n    }<br \/>\n};<\/p>\n<p>\u5f53\u7136&#xff0c;\u9898\u76ee\u4ec5\u9650ASCII\u5b57\u7b26&#xff0c;\u5982\u679c\u6709\u6c49\u5b57\u7b49\u5176\u4ed6\u5b57\u7b26&#xff0c;\u53ef\u4ee5\u5c06128\u6539\u6210Unicode\u768465536&#xff0c;\u6216\u8005\u7528\u771f\u6b63\u7684\u54c8\u5e0c\u8868&#xff0c;\u4ee3\u7801\u505a\u4e86\u4e9b\u6539\u52a8&#xff0c;\u6ce8\u610f\u521d\u59cb\u5316\u548c\u8bbf\u95ee\u65b9\u5f0f\u3002<\/p>\n<p>class Solution {<br \/>\npublic:<br \/>\n    int lengthOfLongestSubstring(string s) {<\/p>\n<p>        unordered_map &lt;char, int&gt; last;<br \/>\n        int left &#061; 0;<br \/>\n        int maxLen &#061; 0;<br \/>\n        for(int right &#061; 0; right &lt; s.size(); right&#043;&#043;){<br \/>\n            char ch &#061; s[right];<br \/>\n            int last_ch &#061; last.count(ch) ? last[ch] : -1;<br \/>\n            \/\/\u5982\u679c\u5b57\u7b26\u51fa\u73b0\u8fc7&#xff0c;\u4e14\u5927\u4e8eleft&#xff0c;left\u8df3\u53d8&#xff0c;\u5408\u8d77\u6765\u5c31\u662f&#xff1a;<br \/>\n            if(last_ch &gt;&#061; left){  \/\/\u8fd9\u91cc\u662f\u5927\u4e8e\u7b49\u4e8e<br \/>\n                left&#061; last[ch] &#043; 1;<br \/>\n            }<br \/>\n            last[ch] &#061; right;   \/\/\u5b9e\u65f6\u66f4\u65b0last<br \/>\n            maxLen &#061; max(maxLen, right &#8211; left &#043; 1); \/\/\u5b9e\u65f6\u66f4\u65b0maxLen<br \/>\n        }<br \/>\n        return maxLen;<\/p>\n<p>    }<br \/>\n};<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u9898\u76ee\u6982\u8981&#xff1a;\u9898\u76ee\u53d9\u8ff0\u8fd8\u662f\u5f88\u6e05\u695a\u7684&#xff0c;\u8981\u6c42\u6211\u4eec\u627e\u51fa\u5b57\u7b26\u4e32\u4e2d\u7684\u4e00\u4e2a\u5b50\u4e32&#xff0c;\u8fd9\u4e2a\u5b50\u4e32\u7684\u6ca1\u6709\u91cd\u590d\u5b57\u7b26&#xff0c;\u800c\u4e14\u6bd4\u8fd9\u4e2a\u5b50\u4e32\u957f\u5ea6\u8fd8\u957f\u7684\u5b50\u4e32\u5fc5\u5b9a\u6709\u91cd\u590d\u51fa\u73b0\u7684\u5b57\u7b26\u3002\u4e00\u5f00\u59cb\u6211\u60f3\u5230\u7684\u662f\u201c\u6ed1\u52a8\u7a97\u53e3\u201d&#xff0c;\u7a97\u53e3\u957f\u5ea6\u4ece2\u5f00\u59cb\u9010\u6b65\u589e\u52a0\u5230\u5b57\u7b26\u4e32\u672c\u8eab\u7684\u957f\u5ea6&#xff0c;\u7a97\u53e3\u4e00\u6b21\u79fb\u52a8\u4e00\u683c&#xff0c;\u5982\u679c\u5f53\u524d\u7a97\u53e3\u6ca1\u6709\u68c0\u6d4b\u5230\u91cd\u590d\u5b57\u7b26&#xff0c;\u8bf4\u660e\u8fd9\u4e2a\u957f\u5ea6\u662f\u53ef\u884c\u7684&#xff0c;\u7a97\u53e3\u957f\u5ea6\u52a01&#xff0c;\u5982\u679c\u68c0\u6d4b\u5230\u91cd\u590d\u5b57\u7b26&#xff0c;\u7a97\u53e3\u79fb\u4e00<\/p>\n","protected":false},"author":2,"featured_media":115571,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[2692,427,925],"topic":[],"class_list":["post-115575","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-leetcode","tag-427","tag-925"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Leetcode\u9898\u5e93\u7b2c3\u9898 \u65e0\u91cd\u590d\u957f\u5ea6\u7684\u6700\u957f\u5b50\u4e32 - \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\/115575.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Leetcode\u9898\u5e93\u7b2c3\u9898 \u65e0\u91cd\u590d\u957f\u5ea6\u7684\u6700\u957f\u5b50\u4e32 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u9898\u76ee\u6982\u8981&#xff1a;\u9898\u76ee\u53d9\u8ff0\u8fd8\u662f\u5f88\u6e05\u695a\u7684&#xff0c;\u8981\u6c42\u6211\u4eec\u627e\u51fa\u5b57\u7b26\u4e32\u4e2d\u7684\u4e00\u4e2a\u5b50\u4e32&#xff0c;\u8fd9\u4e2a\u5b50\u4e32\u7684\u6ca1\u6709\u91cd\u590d\u5b57\u7b26&#xff0c;\u800c\u4e14\u6bd4\u8fd9\u4e2a\u5b50\u4e32\u957f\u5ea6\u8fd8\u957f\u7684\u5b50\u4e32\u5fc5\u5b9a\u6709\u91cd\u590d\u51fa\u73b0\u7684\u5b57\u7b26\u3002\u4e00\u5f00\u59cb\u6211\u60f3\u5230\u7684\u662f\u201c\u6ed1\u52a8\u7a97\u53e3\u201d&#xff0c;\u7a97\u53e3\u957f\u5ea6\u4ece2\u5f00\u59cb\u9010\u6b65\u589e\u52a0\u5230\u5b57\u7b26\u4e32\u672c\u8eab\u7684\u957f\u5ea6&#xff0c;\u7a97\u53e3\u4e00\u6b21\u79fb\u52a8\u4e00\u683c&#xff0c;\u5982\u679c\u5f53\u524d\u7a97\u53e3\u6ca1\u6709\u68c0\u6d4b\u5230\u91cd\u590d\u5b57\u7b26&#xff0c;\u8bf4\u660e\u8fd9\u4e2a\u957f\u5ea6\u662f\u53ef\u884c\u7684&#xff0c;\u7a97\u53e3\u957f\u5ea6\u52a01&#xff0c;\u5982\u679c\u68c0\u6d4b\u5230\u91cd\u590d\u5b57\u7b26&#xff0c;\u7a97\u53e3\u79fb\u4e00\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/115575.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-10-12T09:17:08+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/10\/20261012091701-6acca58db5aac.jpg\" \/>\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=\"2 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/115575.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/115575.html\",\"name\":\"Leetcode\u9898\u5e93\u7b2c3\u9898 \u65e0\u91cd\u590d\u957f\u5ea6\u7684\u6700\u957f\u5b50\u4e32 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-10-12T09:17:08+00:00\",\"dateModified\":\"2026-10-12T09:17:08+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/115575.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/115575.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/115575.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Leetcode\u9898\u5e93\u7b2c3\u9898 \u65e0\u91cd\u590d\u957f\u5ea6\u7684\u6700\u957f\u5b50\u4e32\"}]},{\"@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\u9898\u5e93\u7b2c3\u9898 \u65e0\u91cd\u590d\u957f\u5ea6\u7684\u6700\u957f\u5b50\u4e32 - \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\/115575.html","og_locale":"zh_CN","og_type":"article","og_title":"Leetcode\u9898\u5e93\u7b2c3\u9898 \u65e0\u91cd\u590d\u957f\u5ea6\u7684\u6700\u957f\u5b50\u4e32 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u9898\u76ee\u6982\u8981&#xff1a;\u9898\u76ee\u53d9\u8ff0\u8fd8\u662f\u5f88\u6e05\u695a\u7684&#xff0c;\u8981\u6c42\u6211\u4eec\u627e\u51fa\u5b57\u7b26\u4e32\u4e2d\u7684\u4e00\u4e2a\u5b50\u4e32&#xff0c;\u8fd9\u4e2a\u5b50\u4e32\u7684\u6ca1\u6709\u91cd\u590d\u5b57\u7b26&#xff0c;\u800c\u4e14\u6bd4\u8fd9\u4e2a\u5b50\u4e32\u957f\u5ea6\u8fd8\u957f\u7684\u5b50\u4e32\u5fc5\u5b9a\u6709\u91cd\u590d\u51fa\u73b0\u7684\u5b57\u7b26\u3002\u4e00\u5f00\u59cb\u6211\u60f3\u5230\u7684\u662f\u201c\u6ed1\u52a8\u7a97\u53e3\u201d&#xff0c;\u7a97\u53e3\u957f\u5ea6\u4ece2\u5f00\u59cb\u9010\u6b65\u589e\u52a0\u5230\u5b57\u7b26\u4e32\u672c\u8eab\u7684\u957f\u5ea6&#xff0c;\u7a97\u53e3\u4e00\u6b21\u79fb\u52a8\u4e00\u683c&#xff0c;\u5982\u679c\u5f53\u524d\u7a97\u53e3\u6ca1\u6709\u68c0\u6d4b\u5230\u91cd\u590d\u5b57\u7b26&#xff0c;\u8bf4\u660e\u8fd9\u4e2a\u957f\u5ea6\u662f\u53ef\u884c\u7684&#xff0c;\u7a97\u53e3\u957f\u5ea6\u52a01&#xff0c;\u5982\u679c\u68c0\u6d4b\u5230\u91cd\u590d\u5b57\u7b26&#xff0c;\u7a97\u53e3\u79fb\u4e00","og_url":"https:\/\/www.wsisp.com\/helps\/115575.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-10-12T09:17:08+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/10\/20261012091701-6acca58db5aac.jpg"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"2 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/115575.html","url":"https:\/\/www.wsisp.com\/helps\/115575.html","name":"Leetcode\u9898\u5e93\u7b2c3\u9898 \u65e0\u91cd\u590d\u957f\u5ea6\u7684\u6700\u957f\u5b50\u4e32 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-10-12T09:17:08+00:00","dateModified":"2026-10-12T09:17:08+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/115575.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/115575.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/115575.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"Leetcode\u9898\u5e93\u7b2c3\u9898 \u65e0\u91cd\u590d\u957f\u5ea6\u7684\u6700\u957f\u5b50\u4e32"}]},{"@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\/115575","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=115575"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/115575\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/115571"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=115575"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=115575"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=115575"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=115575"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}