{"id":82,"date":"2025-11-18T12:48:54","date_gmt":"2025-11-18T04:48:54","guid":{"rendered":"https:\/\/www.xieyuchen.xyz\/?p=82"},"modified":"2025-11-18T13:07:34","modified_gmt":"2025-11-18T05:07:34","slug":"%e5%90%88%e5%b9%b6%e4%b8%a4%e4%b8%aa%e6%9c%89%e5%ba%8f%e9%93%be%e8%a1%a8","status":"publish","type":"post","link":"https:\/\/www.xieyuchen.xyz\/index.php\/2025\/11\/18\/%e5%90%88%e5%b9%b6%e4%b8%a4%e4%b8%aa%e6%9c%89%e5%ba%8f%e9%93%be%e8%a1%a8\/","title":{"rendered":"\u5408\u5e76\u4e24\u4e2a\u6709\u5e8f\u94fe\u8868"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><strong>\u8f93\u5165\uff1a<\/strong>l1 = [1,2,4], l2 = [1.3.4]<br><strong>\u8f93\u51fa\uff1a<\/strong>[1,1,2,3,4,4,]<br><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u793a\u4f8b 2\uff1a<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><strong>\u8f93\u5165\uff1a<\/strong>l1 = [], l2 = []\n<strong>\u8f93\u51fa\uff1a<\/strong>[]\n<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u793a\u4f8b 3\uff1a<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><strong>\u8f93\u5165\uff1a<\/strong>l1 = [], l2 = [0]\n<strong>\u8f93\u51fa\uff1a<\/strong>[0]\n<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u9012\u5f52\u5b9e\u73b0<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u538b\u6808\u539f\u7406<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>class Solution {\n    fun mergeTwoLists(list1: ListNode?, list2: ListNode?): ListNode? {\n        \/\/ \u5982\u679c\u5176\u4e2d\u4e00\u4e2a\u4e3a\u7a7a\uff0c\u76f4\u63a5\u8fd4\u56de\u53e6\u4e00\u4e2a\n        if (list1 == null) return list2\n        if (list2 == null) return list1\n        \n        \/\/ \u6bd4\u8f83\u4e24\u4e2a\u8282\u70b9\u7684\u503c\uff0c\u5c0f\u7684\u4f5c\u4e3a\u5934\u8282\u70b9\n        if (list1.`val` &lt; list2.`val`) {\n            list1.next = mergeTwoLists(list1.next, list2)\n            return list1\n        } else {\n            list2.next = mergeTwoLists(list1, list2.next)\n            return list2\n        }\n    }\n}<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u8f93\u5165\uff1al1 = [1,2,4], l2 = [1.3.4]\u8f93\u51fa\uff1a[1,1,2,3,4,4,] \u793a\u4f8b 2\uff1a \u8f93\u5165 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":34,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-82","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-4"],"_links":{"self":[{"href":"https:\/\/www.xieyuchen.xyz\/index.php\/wp-json\/wp\/v2\/posts\/82","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.xieyuchen.xyz\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.xieyuchen.xyz\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.xieyuchen.xyz\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.xieyuchen.xyz\/index.php\/wp-json\/wp\/v2\/comments?post=82"}],"version-history":[{"count":0,"href":"https:\/\/www.xieyuchen.xyz\/index.php\/wp-json\/wp\/v2\/posts\/82\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.xieyuchen.xyz\/index.php\/wp-json\/wp\/v2\/media\/34"}],"wp:attachment":[{"href":"https:\/\/www.xieyuchen.xyz\/index.php\/wp-json\/wp\/v2\/media?parent=82"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.xieyuchen.xyz\/index.php\/wp-json\/wp\/v2\/categories?post=82"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.xieyuchen.xyz\/index.php\/wp-json\/wp\/v2\/tags?post=82"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}