{"id":77443,"date":"2026-02-24T18:43:04","date_gmt":"2026-02-24T10:43:04","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/77443.html"},"modified":"2026-02-24T18:43:04","modified_gmt":"2026-02-24T10:43:04","slug":"leetcode%e7%83%ad%e9%a2%98100-%e5%9b%9e%e6%96%87%e9%93%be%e8%a1%a8","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/77443.html","title":{"rendered":"LeetCode\u70ed\u9898100 \u56de\u6587\u94fe\u8868"},"content":{"rendered":"<h4>\u9898\u76ee\u63cf\u8ff0<\/h4>\n<p>\u7ed9\u4f60\u4e00\u4e2a\u5355\u94fe\u8868\u7684\u5934\u8282\u70b9 head &#xff0c;\u8bf7\u4f60\u5224\u65ad\u8be5\u94fe\u8868\u662f\u5426\u4e3a\u56de\u6587\u94fe\u8868\u3002\u5982\u679c\u662f&#xff0c;\u8fd4\u56de true &#xff1b;\u5426\u5219&#xff0c;\u8fd4\u56de false \u3002<\/p>\n<h4>\u793a\u4f8b 1&#xff1a;<\/h4>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/02\/20260224104302-699d80b6cd250.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><br \/>\n\u8f93\u5165&#xff1a; head &#061; [1,2,2,1]<br \/>\n\u8f93\u51fa&#xff1a; true<\/p>\n<h4>\u793a\u4f8b 2&#xff1a;<\/h4>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/02\/20260224104302-699d80b6e625d.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><br \/>\n\u8f93\u5165&#xff1a; head &#061; [1,2]<br \/>\n\u8f93\u51fa&#xff1a; false<\/p>\n<h4>\u63d0\u793a&#xff1a;<\/h4>\n<p><span class=\"katex--inline\"><span class=\"katex\"><span class=\"katex-mathml\">\u94fe\u8868\u4e2d\u8282\u70b9\u6570\u76ee\u5728\u8303\u56f4[1,105]\u5185\u94fe\u8868\u4e2d\u8282\u70b9\u6570\u76ee\u5728\u8303\u56f4[1, 10^5] \u5185<\/span><span class=\"katex-html\"><span class=\"base\"><span class=\"strut\" style=\"height: 1.0641em;vertical-align: -0.25em\"><\/span><span class=\"mord cjk_fallback\">\u94fe\u8868\u4e2d\u8282\u70b9\u6570\u76ee\u5728\u8303\u56f4<\/span><span class=\"mopen\">[<\/span><span class=\"mord\">1<\/span><span class=\"mpunct\">,<\/span><span class=\"mspace\" style=\"margin-right: 0.1667em\"><\/span><span class=\"mord\">1<\/span><span class=\"mord\"><span class=\"mord\">0<\/span><span class=\"msupsub\"><span class=\"vlist-t\"><span class=\"vlist-r\"><span class=\"vlist\" style=\"height: 0.8141em\"><span class=\"\" style=\"top: -3.063em;margin-right: 0.05em\"><span class=\"pstrut\" style=\"height: 2.7em\"><\/span><span class=\"sizing reset-size6 size3 mtight\"><span class=\"mord mtight\">5<\/span><\/span><\/span><\/span><\/span><\/span><\/span><\/span><span class=\"mclose\">]<\/span><span class=\"mord cjk_fallback\">\u5185<\/span><\/span><\/span><\/span><\/span><br \/>\n<span class=\"katex--inline\"><span class=\"katex\"><span class=\"katex-mathml\">0&lt;&#061;Node.val&lt;&#061;90 &lt;&#061; Node.val &lt;&#061; 9<\/span><span class=\"katex-html\"><span class=\"base\"><span class=\"strut\" style=\"height: 0.6835em;vertical-align: -0.0391em\"><\/span><span class=\"mord\">0<\/span><span class=\"mspace\" style=\"margin-right: 0.2778em\"><\/span><span class=\"mrel\">&lt;&#061;<\/span><span class=\"mspace\" style=\"margin-right: 0.2778em\"><\/span><\/span><span class=\"base\"><span class=\"strut\" style=\"height: 0.7335em;vertical-align: -0.0391em\"><\/span><span class=\"mord mathnormal\" style=\"margin-right: 0.109em\">N<\/span><span class=\"mord mathnormal\">o<\/span><span class=\"mord mathnormal\">d<\/span><span class=\"mord mathnormal\">e<\/span><span class=\"mord\">.<\/span><span class=\"mord mathnormal\" style=\"margin-right: 0.0359em\">v<\/span><span class=\"mord mathnormal\">a<\/span><span class=\"mord mathnormal\" style=\"margin-right: 0.0197em\">l<\/span><span class=\"mspace\" style=\"margin-right: 0.2778em\"><\/span><span class=\"mrel\">&lt;&#061;<\/span><span class=\"mspace\" style=\"margin-right: 0.2778em\"><\/span><\/span><span class=\"base\"><span class=\"strut\" style=\"height: 0.6444em\"><\/span><span class=\"mord\">9<\/span><\/span><\/span><\/span><\/span><\/p>\n<h4>\u601d\u8def<\/h4>\n<p>1 \u4f7f\u7528\u5feb\u6162\u6307\u9488\u83b7\u53d6\u4e2d\u5fc3\u4f4d\u7f6e\u3002<br \/>\n2 \u5c06\u5176\u4e2d\u4e00\u90e8\u5206\u8fdb\u884c\u7ffb\u8f6c\u540e\u8fdb\u884c\u4e00\u4e00\u5bf9\u6bd4\u3002<\/p>\n<h4>\u4ee3\u7801<\/h4>\n<p><span class=\"token keyword\">class<\/span> <span class=\"token class-name\">Solution<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n<span class=\"token keyword\">public<\/span><span class=\"token operator\">:<\/span><br \/>\n    <span class=\"token keyword\">bool<\/span> <span class=\"token function\">isPalindrome<\/span><span class=\"token punctuation\">(<\/span>ListNode<span class=\"token operator\">*<\/span> head<span class=\"token punctuation\">)<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n        <span class=\"token keyword\">if<\/span><span class=\"token punctuation\">(<\/span>head <span class=\"token operator\">&#061;&#061;<\/span> <span class=\"token keyword\">nullptr<\/span> <span class=\"token operator\">||<\/span> head<span class=\"token operator\">-&gt;<\/span>next <span class=\"token operator\">&#061;&#061;<\/span> <span class=\"token keyword\">nullptr<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token keyword\">return<\/span> <span class=\"token boolean\">true<\/span><span class=\"token punctuation\">;<\/span><\/p>\n<p>        <span class=\"token comment\">\/\/ 1 \u83b7\u53d6\u7b2c\u4e00\u90e8\u5206\u5c3e\u90e8<\/span><br \/>\n        ListNode <span class=\"token operator\">*<\/span>firstHalfEnd <span class=\"token operator\">&#061;<\/span> <span class=\"token function\">endOfFirstHalf<\/span><span class=\"token punctuation\">(<\/span>head<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n        <span class=\"token comment\">\/\/ 2 \u5c06\u7b2c\u4e8c\u90e8\u5206\u8fdb\u884c\u7ffb\u8f6c<\/span><br \/>\n        ListNode <span class=\"token operator\">*<\/span>secondHalfStart <span class=\"token operator\">&#061;<\/span> <span class=\"token function\">reverseList<\/span><span class=\"token punctuation\">(<\/span>firstHalfEnd<span class=\"token operator\">-&gt;<\/span>next<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n        <span class=\"token comment\">\/\/ 3 \u5bf9\u6bd4\u662f\u5426\u76f8\u7b49<\/span><br \/>\n        ListNode <span class=\"token operator\">*<\/span>p1 <span class=\"token operator\">&#061;<\/span> head<span class=\"token punctuation\">;<\/span><br \/>\n        ListNode <span class=\"token operator\">*<\/span>p2 <span class=\"token operator\">&#061;<\/span> secondHalfStart<span class=\"token punctuation\">;<\/span><br \/>\n        <span class=\"token keyword\">bool<\/span> res <span class=\"token operator\">&#061;<\/span> <span class=\"token boolean\">true<\/span><span class=\"token punctuation\">;<\/span><br \/>\n        <span class=\"token keyword\">while<\/span><span class=\"token punctuation\">(<\/span>p2 <span class=\"token operator\">!&#061;<\/span> <span class=\"token keyword\">nullptr<\/span><span class=\"token punctuation\">)<\/span><br \/>\n        <span class=\"token punctuation\">{<\/span><br \/>\n            <span class=\"token keyword\">if<\/span><span class=\"token punctuation\">(<\/span>p1<span class=\"token operator\">-&gt;<\/span>val <span class=\"token operator\">!&#061;<\/span> p2<span class=\"token operator\">-&gt;<\/span>val<span class=\"token punctuation\">)<\/span><br \/>\n            <span class=\"token punctuation\">{<\/span><br \/>\n                res <span class=\"token operator\">&#061;<\/span> <span class=\"token boolean\">false<\/span><span class=\"token punctuation\">;<\/span><br \/>\n                <span class=\"token keyword\">break<\/span><span class=\"token punctuation\">;<\/span><br \/>\n            <span class=\"token punctuation\">}<\/span><br \/>\n            p1 <span class=\"token operator\">&#061;<\/span> p1<span class=\"token operator\">-&gt;<\/span>next<span class=\"token punctuation\">;<\/span><br \/>\n            p2 <span class=\"token operator\">&#061;<\/span> p2<span class=\"token operator\">-&gt;<\/span>next<span class=\"token punctuation\">;<\/span><br \/>\n        <span class=\"token punctuation\">}<\/span><br \/>\n        <span class=\"token comment\">\/\/ 4 \u7ffb\u8f6c\u56de\u53bb\u590d\u539f<\/span><br \/>\n        firstHalfEnd<span class=\"token operator\">-&gt;<\/span>next <span class=\"token operator\">&#061;<\/span> <span class=\"token function\">reverseList<\/span><span class=\"token punctuation\">(<\/span>secondHalfStart<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span><br \/>\n        <span class=\"token keyword\">return<\/span> res<span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><br \/>\n    <span class=\"token comment\">\/\/  \u5feb\u6162\u6307\u9488\u83b7\u53d6\u4e2d\u95f4\u90e8\u5206 (n&#043;1)\/2<\/span><br \/>\n    ListNode <span class=\"token operator\">*<\/span><span class=\"token function\">endOfFirstHalf<\/span><span class=\"token punctuation\">(<\/span>ListNode <span class=\"token operator\">*<\/span>head<span class=\"token punctuation\">)<\/span><br \/>\n    <span class=\"token punctuation\">{<\/span><br \/>\n        ListNode <span class=\"token operator\">*<\/span>fast <span class=\"token operator\">&#061;<\/span> head<span class=\"token punctuation\">;<\/span><br \/>\n        ListNode <span class=\"token operator\">*<\/span>slow <span class=\"token operator\">&#061;<\/span> head<span class=\"token punctuation\">;<\/span><br \/>\n        <span class=\"token keyword\">while<\/span><span class=\"token punctuation\">(<\/span>fast<span class=\"token operator\">-&gt;<\/span>next <span class=\"token operator\">!&#061;<\/span> <span class=\"token keyword\">nullptr<\/span> <span class=\"token operator\">&amp;&amp;<\/span> fast<span class=\"token operator\">-&gt;<\/span>next<span class=\"token operator\">-&gt;<\/span>next <span class=\"token operator\">!&#061;<\/span> <span class=\"token keyword\">nullptr<\/span><span class=\"token punctuation\">)<\/span><br \/>\n        <span class=\"token punctuation\">{<\/span><br \/>\n            fast <span class=\"token operator\">&#061;<\/span> fast<span class=\"token operator\">-&gt;<\/span>next<span class=\"token operator\">-&gt;<\/span>next<span class=\"token punctuation\">;<\/span><br \/>\n            slow <span class=\"token operator\">&#061;<\/span> slow<span class=\"token operator\">-&gt;<\/span>next<span class=\"token punctuation\">;<\/span><br \/>\n        <span class=\"token punctuation\">}<\/span><br \/>\n        <span class=\"token keyword\">return<\/span> slow<span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><br \/>\n    <span class=\"token comment\">\/\/ \u5bf9\u94fe\u8868\u8fdb\u884c\u7ffb\u8f6c<\/span><br \/>\n    ListNode<span class=\"token operator\">*<\/span> <span class=\"token function\">reverseList<\/span><span class=\"token punctuation\">(<\/span>ListNode<span class=\"token operator\">*<\/span> head<span class=\"token punctuation\">)<\/span><br \/>\n    <span class=\"token punctuation\">{<\/span><br \/>\n        ListNode <span class=\"token operator\">*<\/span> tail <span class=\"token operator\">&#061;<\/span> <span class=\"token keyword\">nullptr<\/span><span class=\"token punctuation\">;<\/span><br \/>\n        ListNode <span class=\"token operator\">*<\/span> cur <span class=\"token operator\">&#061;<\/span> <span class=\"token keyword\">nullptr<\/span><span class=\"token punctuation\">;<\/span><br \/>\n        <span class=\"token keyword\">while<\/span><span class=\"token punctuation\">(<\/span>head <span class=\"token operator\">!&#061;<\/span> <span class=\"token keyword\">nullptr<\/span><span class=\"token punctuation\">)<\/span><br \/>\n        <span class=\"token punctuation\">{<\/span><br \/>\n            <span class=\"token comment\">\/\/ \u4fdd\u5b58\u4e0b\u4e00\u4e2a\u4f4d\u7f6e<\/span><br \/>\n            ListNode <span class=\"token operator\">*<\/span> cur <span class=\"token operator\">&#061;<\/span> head<span class=\"token operator\">-&gt;<\/span>next<span class=\"token punctuation\">;<\/span><br \/>\n            <span class=\"token comment\">\/\/ \u4fee\u6539\u5f53\u524d\u4f4d\u7f6e\u7684\u6307\u5411<\/span><br \/>\n            head<span class=\"token operator\">-&gt;<\/span>next <span class=\"token operator\">&#061;<\/span> tail<span class=\"token punctuation\">;<\/span><br \/>\n            tail <span class=\"token operator\">&#061;<\/span> head<span class=\"token punctuation\">;<\/span><br \/>\n            <span class=\"token comment\">\/\/ \u83b7\u53d6\u4e0b\u4e00\u4e2a\u4f4d\u7f6e<\/span><br \/>\n            head <span class=\"token operator\">&#061;<\/span> cur<span class=\"token punctuation\">;<\/span><br \/>\n        <span class=\"token punctuation\">}<\/span><br \/>\n        <span class=\"token keyword\">return<\/span> tail<span class=\"token punctuation\">;<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">;<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u9898\u76ee\u63cf\u8ff0<br \/>\n\u7ed9\u4f60\u4e00\u4e2a\u5355\u94fe\u8868\u7684\u5934\u8282\u70b9 head &#xff0c;\u8bf7\u4f60\u5224\u65ad\u8be5\u94fe\u8868\u662f\u5426\u4e3a\u56de\u6587\u94fe\u8868\u3002\u5982\u679c\u662f&#xff0c;\u8fd4\u56de true &#xff1b;\u5426\u5219&#xff0c;\u8fd4\u56de false \u3002<br \/>\n\u793a\u4f8b 1&#xff1a;\u8f93\u5165&#xff1a; head  [1,2,2,1]<br \/>\n\u8f93\u51fa&#xff1a; true<br \/>\n\u793a\u4f8b 2&#xff1a;\u8f93\u5165&#xff1a; head  [1,2]<br \/>\n\u8f93\u51fa&#xff1a; false<br \/>\n\u63d0\u793a&#xff1a;<br \/>\n\u94fe\u8868\u4e2d\u8282\u70b9\u6570\u76ee\u5728\u8303\u56f4[1,105]\u5185\u94fe\u8868\u4e2d\u8282\u70b9\u6570\u76ee\u5728\u8303\u56f4[<\/p>\n","protected":false},"author":2,"featured_media":77441,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[2692,1813,427,2640],"topic":[],"class_list":["post-77443","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-leetcode","tag-1813","tag-427","tag-2640"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>LeetCode\u70ed\u9898100 \u56de\u6587\u94fe\u8868 - \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\/77443.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"LeetCode\u70ed\u9898100 \u56de\u6587\u94fe\u8868 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u9898\u76ee\u63cf\u8ff0 \u7ed9\u4f60\u4e00\u4e2a\u5355\u94fe\u8868\u7684\u5934\u8282\u70b9 head &#xff0c;\u8bf7\u4f60\u5224\u65ad\u8be5\u94fe\u8868\u662f\u5426\u4e3a\u56de\u6587\u94fe\u8868\u3002\u5982\u679c\u662f&#xff0c;\u8fd4\u56de true &#xff1b;\u5426\u5219&#xff0c;\u8fd4\u56de false \u3002 \u793a\u4f8b 1&#xff1a;\u8f93\u5165&#xff1a; head [1,2,2,1] \u8f93\u51fa&#xff1a; true \u793a\u4f8b 2&#xff1a;\u8f93\u5165&#xff1a; head [1,2] \u8f93\u51fa&#xff1a; false \u63d0\u793a&#xff1a; \u94fe\u8868\u4e2d\u8282\u70b9\u6570\u76ee\u5728\u8303\u56f4[1,105]\u5185\u94fe\u8868\u4e2d\u8282\u70b9\u6570\u76ee\u5728\u8303\u56f4[\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/77443.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-02-24T10:43:04+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/02\/20260224104302-699d80b6cd250.png\" \/>\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=\"1 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/77443.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/77443.html\",\"name\":\"LeetCode\u70ed\u9898100 \u56de\u6587\u94fe\u8868 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-02-24T10:43:04+00:00\",\"dateModified\":\"2026-02-24T10:43:04+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/77443.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/77443.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/77443.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"LeetCode\u70ed\u9898100 \u56de\u6587\u94fe\u8868\"}]},{\"@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\u70ed\u9898100 \u56de\u6587\u94fe\u8868 - \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\/77443.html","og_locale":"zh_CN","og_type":"article","og_title":"LeetCode\u70ed\u9898100 \u56de\u6587\u94fe\u8868 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u9898\u76ee\u63cf\u8ff0 \u7ed9\u4f60\u4e00\u4e2a\u5355\u94fe\u8868\u7684\u5934\u8282\u70b9 head &#xff0c;\u8bf7\u4f60\u5224\u65ad\u8be5\u94fe\u8868\u662f\u5426\u4e3a\u56de\u6587\u94fe\u8868\u3002\u5982\u679c\u662f&#xff0c;\u8fd4\u56de true &#xff1b;\u5426\u5219&#xff0c;\u8fd4\u56de false \u3002 \u793a\u4f8b 1&#xff1a;\u8f93\u5165&#xff1a; head [1,2,2,1] \u8f93\u51fa&#xff1a; true \u793a\u4f8b 2&#xff1a;\u8f93\u5165&#xff1a; head [1,2] \u8f93\u51fa&#xff1a; false \u63d0\u793a&#xff1a; \u94fe\u8868\u4e2d\u8282\u70b9\u6570\u76ee\u5728\u8303\u56f4[1,105]\u5185\u94fe\u8868\u4e2d\u8282\u70b9\u6570\u76ee\u5728\u8303\u56f4[","og_url":"https:\/\/www.wsisp.com\/helps\/77443.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-02-24T10:43:04+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/02\/20260224104302-699d80b6cd250.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"1 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/77443.html","url":"https:\/\/www.wsisp.com\/helps\/77443.html","name":"LeetCode\u70ed\u9898100 \u56de\u6587\u94fe\u8868 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-02-24T10:43:04+00:00","dateModified":"2026-02-24T10:43:04+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/77443.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/77443.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/77443.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"LeetCode\u70ed\u9898100 \u56de\u6587\u94fe\u8868"}]},{"@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\/77443","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=77443"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/77443\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/77441"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=77443"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=77443"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=77443"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=77443"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}