labuladong / basic-challenge

200 stars 22 forks source link

已结束 #335

Closed labuladong closed 1 year ago

labuladong commented 1 year ago

本期打卡已结算完成。报名最新一期的打卡活动 点这里

KenanHuang commented 1 year ago

https://leetcode.cn/problems/merge-k-sorted-lists/solution/he-bing-kge-pai-xu-lian-biao-fu-xi-you-x-dlcu/ https://leetcode.cn/problems/middle-of-the-linked-list/solution/kuai-man-zhi-zhen-qiu-zhong-jian-jie-dia-8ric/ https://leetcode.cn/problems/linked-list-cycle-ii/solution/kuai-man-zhi-zhen-tan-ce-shi-fou-you-hua-lch7/ https://leetcode.cn/problems/intersection-of-two-linked-lists/solution/pin-jie-liang-biao-guan-cha-shi-fou-you-fptrm/

ConnieLuksc commented 1 year ago

https://leetcode.com/problems/merge-two-sorted-lists/solutions/3844007/merge-two-sorted-lists-in-python/

KarlZhu-SE commented 1 year ago

https://leetcode.com/problems/merge-k-sorted-lists/solutions/3844157/heap-solution-python-3/

Cathy830 commented 1 year ago

https://leetcode.com/problems/merge-two-sorted-lists/solutions/3844424/merge-two-sorted-list-in-java-using-two-pointers/

macksonyli21826 commented 1 year ago

https://leetcode.cn/problems/merge-two-sorted-lists/solutions/2367106/leetcode-21-merge-two-sorted-lists-by-ha-g7d2/ https://leetcode.cn/problems/partition-list/solutions/2367111/leetcode-86-partition-list-by-hachi-loku-smks/ https://leetcode.cn/problems/remove-nth-node-from-end-of-list/solutions/2367116/leetcode-19-remove-nth-node-from-end-of-pq5rw/ https://leetcode.cn/problems/middle-of-the-linked-list/solutions/2367118/leetcode-876-middle-of-the-linked-list-b-m5lg/ https://leetcode.cn/problems/linked-list-cycle-ii/solutions/2367121/leetcode-142-linked-list-cycle-ii-by-hac-45pn/ https://leetcode.cn/problems/intersection-of-two-linked-lists/solutions/2367123/leetcode-160-intersection-of-two-linked-e762j/

GodisinHisHeaven commented 1 year ago

https://leetcode.com/problems/merge-k-sorted-lists/solutions/3844944/priority-queue/

PINKDDDD commented 1 year ago

https://leetcode.com/problems/merge-two-sorted-lists/solutions/3845024/merge-two-sorted-lists/ https://leetcode.com/problems/partition-list/solutions/3845059/partition-list/

zexianw12 commented 1 year ago

https://leetcode.cn/problems/merge-two-sorted-lists/solutions/2367140/he-bing-liang-ge-you-xu-lian-biao-by-vve-06vs/ https://leetcode.cn/problems/merge-k-sorted-lists/solutions/2367227/you-xian-ji-dui-lie-jie-jue-wen-ti-by-vv-oaw7/

ShaodongGu commented 1 year ago

https://leetcode.com/problems/remove-nth-node-from-end-of-list/solutions/3845260/two-pointers-approach/

Reset0808 commented 1 year ago

https://leetcode.cn/problems/merge-two-sorted-lists/solutions/2367178/shuang-zhi-zhen-fa-by-2ba4zmutle-rkzt/

txhj1996 commented 1 year ago

https://leetcode.cn/problems/linked-list-cycle/solution/kuai-man-shuang-zhi-zhen-jie-jue-huan-xi-rbsc/ https://leetcode.cn/problems/linked-list-cycle-ii/solution/shuang-zhi-zhen-jie-jue-huan-xing-lian-b-d0va/

dh0072 commented 1 year ago

Q21. Merge Two Sorted Lists 两个解法:Iteration和Recursion https://leetcode.com/problems/merge-two-sorted-lists/discuss/3844417/Java-Iteration-and-Recursion

Q86. Partition List 这个解法基于东哥版本做了微调 https://leetcode.com/problems/partition-list/discuss/3844487/Java-Solution

Q23. Merge k Sorted Lists 两个解法:PQ和Merge Sort https://leetcode.com/problems/merge-k-sorted-lists/discuss/3845072/Java-Solution-PQ-and-Merge-Sort

Q19. Remove Nth Node From End of List https://leetcode.com/problems/remove-nth-node-from-end-of-list/discuss/3845297/Java-Iteration-Solution

Q876. Middle of the Linked List https://leetcode.com/problems/middle-of-the-linked-list/discuss/3845311/Intuitive-Solution-in-Java-Slow-Fast-Pointer-Approach

Q141. Linked List Cycle https://leetcode.com/problems/linked-list-cycle/discuss/3845319/Java-Intuitive-Solution

Q142. Linked List Cycle II https://leetcode.com/problems/linked-list-cycle-ii/discuss/3845353/Java-Iterative-Solution

Q160. Intersection of Two Linked Lists https://leetcode.com/problems/intersection-of-two-linked-lists/discuss/3845376/Java-Solution

Rayden-Xu commented 1 year ago

两个环形链表题解,抽象框架

  1. 环形链表 https://leetcode.cn/problems/linked-list-cycle/solutions/2367256/kuai-man-zhi-zhen-python-by-raydenx-0j2x/
  2. 环形链表2 https://leetcode.cn/problems/linked-list-cycle-ii/solutions/2367264/kuai-man-zhi-zhen-zhong-zhi-zhi-zhen-by-tqsnz/
guaZong commented 1 year ago
  1. 合并两个有序列表 https://leetcode.cn/problems/merge-two-sorted-lists/solutions/2367301/di-gui-die-dai-hua-tu-jie-fa-by-gua-xi-x-jviv/
Chao200 commented 1 year ago

21: https://leetcode.cn/problems/merge-two-sorted-lists/solutions/2367228/solution21-he-bing-liang-ge-you-xu-lian-wxya6/

86: https://leetcode.cn/problems/partition-list/solutions/2367261/solution86-fen-ge-lian-biao-by-xiaochao2-qehf/

160: https://leetcode.cn/problems/intersection-of-two-linked-lists/solutions/2367291/solution160-xiang-jiao-lian-biao-by-xiao-oa57/

876: https://leetcode.cn/problems/middle-of-the-linked-list/solutions/2367333/solution876-lian-biao-de-zhong-jian-jie-6i0fk/

142: https://leetcode.cn/problems/linked-list-cycle-ii/solutions/2367317/solution142-huan-xing-lian-biao-ii-by-xi-8dqr/

19: https://leetcode.cn/problems/remove-nth-node-from-end-of-list/solutions/2367363/solution19-shan-chu-lian-biao-de-dao-shu-k3lc/

23: https://leetcode.cn/problems/merge-k-sorted-lists/solutions/2367410/solution23-he-bing-k-ge-sheng-xu-lian-bi-hi4d/

Jilingwei commented 1 year ago

21: https://leetcode.cn/problems/merge-two-sorted-lists/solutions/2367477/leetcodedi-21ti-lian-biao-shuang-zhi-zhe-fz1d/ 86: https://leetcode.cn/problems/partition-list/solutions/2368020/leetcode86ti-by-ji-ling-wei-2-xu0j/ 23: https://leetcode.cn/problems/merge-k-sorted-lists/solutions/2368138/leetcode23-zui-xiao-dui-by-ji-ling-wei-2-w8l1/

jojoss commented 1 year ago

[19. Remove Nth Node From End of List] https://leetcode.com/problems/remove-nth-node-from-end-of-list/solutions/3845644/two-pointers-to-solve/

chen-huanxin commented 1 year ago

21:https://leetcode.cn/problems/merge-two-sorted-lists/solutions/2367199/he-bing-liang-ge-you-xu-lian-biao-die-da-bfio/ 86:https://leetcode.cn/problems/partition-list/solutions/2367272/cppdummy-fen-ge-lian-biao-by-benobug-53ml/ 23:https://leetcode.cn/problems/merge-k-sorted-lists/solutions/2367344/cppyou-xian-dui-lie-23-he-bing-k-ge-shen-tfe7/

ljrirene commented 1 year ago

https://leetcode.com/problems/linked-list-cycle-ii/solutions/3845747/using-slow-fast-pointer-to-chek-circle-in-the-linklist/

yihaozhong commented 1 year ago

21. Merge Two Sorted Lists: https://leetcode.com/problems/merge-two-sorted-lists/solutions/3845556/linkedlist-two-pointer-1/

86. Partition List https://leetcode.com/problems/partition-list/solutions/3845583/linked-list-two-pointer-2/

23. Merge k Sorted Lists https://leetcode.com/problems/merge-k-sorted-lists/solutions/3845681/linked-list-two-pointer-3/

19. Remove Nth Node From End of List https://leetcode.com/problems/remove-nth-node-from-end-of-list/solutions/3850673/linked-list-two-pointer-4/

876. Middle of the Linked List https://leetcode.com/problems/middle-of-the-linked-list/solutions/3850708/linked-list-two-pointer-5/

142. Linked List Cycle II https://leetcode.com/problems/linked-list-cycle-ii/solutions/3850773/linked-list-two-pointer-6/

160. Intersection of Two Linked Lists https://leetcode.com/problems/intersection-of-two-linked-lists/solutions/3850821/linked-list-two-pointer-7/

wusidong commented 1 year ago

合并两个有序链表 :https://leetcode.cn/problems/merge-two-sorted-lists/solutions/2367296/he-bing-liang-ge-you-xu-lian-biao-by-gei-uvqm/ 分隔链表 : https://leetcode.cn/problems/partition-list/solutions/2367387/fen-ge-lian-biao-by-gei-wei-lai-de-zi-ji-ewkg/ 合并K个排序链表:https://leetcode.cn/problems/merge-k-sorted-lists/solutions/2367437/he-bing-kge-pai-xu-lian-biao-by-gei-wei-5msdl/ 删除链表的倒数第 N 个结点:https://leetcode.cn/problems/remove-nth-node-from-end-of-list/solutions/2367462/shan-chu-lian-biao-de-dao-shu-di-n-ge-ji-m6a5/ 判断链表有环:https://leetcode.cn/problems/linked-list-cycle/solutions/2367493/pan-duan-lian-biao-you-huan-by-gei-wei-l-1fla/ 求环形链表的交点:https://leetcode.cn/problems/linked-list-cycle-ii/solutions/2367505/7-qiu-huan-xing-lian-biao-de-jiao-dian-b-3i62/ 相加链表起点:https://leetcode.cn/problems/intersection-of-two-linked-lists/solutions/2367519/xiang-jia-lian-biao-qi-dian-by-gei-wei-l-9j3c/

CarolSSS commented 1 year ago

https://leetcode.com/problems/middle-of-the-linked-list/solutions/3845874/slow-fast-pointer/ https://leetcode.com/problems/remove-nth-node-from-end-of-list/solutions/3845933/slow-fast-pointers/

Susan19996 commented 1 year ago

https://leetcode.com/problems/merge-k-sorted-lists/

https://leetcode.com/problems/merge-two-sorted-lists/

Bamoon622 commented 1 year ago

https://leetcode.com/problems/remove-nth-node-from-end-of-list/solutions/3846328/leetcode-19-remove-nth-node-from-end-of-list/

vanessacz commented 1 year ago

Linked List Cycle: https://leetcode.com/problems/linked-list-cycle/solutions/3846221/java-two-pointers-solution/ Linked List Cycle II: https://leetcode.com/problems/linked-list-cycle-ii/solutions/3846383/java-two-pointers-solution/

aucker commented 1 year ago
  1. Linked list cycle https://leetcode.com/problems/linked-list-cycle/solutions/3845411/two-pointers-liked-list-cycle/
  2. Linked list cycle II https://leetcode.com/problems/linked-list-cycle-ii/solutions/3846329/two-pointer-linked-list-cycle/
guabigwind commented 1 year ago

合并两个有序链表 : https://leetcode.cn/problems/merge-two-sorted-lists/solutions/2367795/he-bing-2ge-you-xu-lie-biao-java-by-guab-kf0n/ 分割链表: https://leetcode.cn/problems/partition-list/solutions/2368106/fen-ge-lian-biao-by-guabigwind-d4kh/

lidebin11 commented 1 year ago

合并两个有序链表: https://leetcode.cn/problems/merge-two-sorted-lists/solution/python-shuang-zhi-zhen-zhu-shi-qing-chu-fe07a/

AstrKing commented 1 year ago

19:https://leetcode.cn/problems/remove-nth-node-from-end-of-list/solutions/2367659/19-shan-chu-lian-biao-de-dao-shu-di-n-ge-i408/ 21:https://leetcode.cn/problems/merge-two-sorted-lists/solutions/2367669/21-he-bing-liang-ge-you-xu-lian-biao-by-wnrr4/ 23:https://leetcode.cn/problems/merge-k-sorted-lists/solutions/2367742/23-he-bing-k-ge-sheng-xu-lian-biao-by-ak-unxf/ 86:https://leetcode.cn/problems/partition-list/solutions/2367748/86-fen-ge-lian-biao-by-aktrking-7ij4/ 141:https://leetcode.cn/problems/linked-list-cycle/solutions/2367754/141-huan-xing-lian-biao-by-aktrking-b233/ 142:https://leetcode.cn/problems/linked-list-cycle-ii/solutions/2367768/142-huan-xing-lian-biao-ii-by-aktrking-4d59/ 160:https://leetcode.cn/problems/intersection-of-two-linked-lists/solutions/2367841/160-xiang-jiao-lian-biao-by-aktrking-4903/ 876:https://leetcode.cn/problems/middle-of-the-linked-list/solutions/2367845/876-lian-biao-de-zhong-jian-jie-dian-by-p32l7/

sdyin commented 1 year ago

142: https://leetcode.cn/problems/linked-list-cycle-ii/solutions/2367854/huan-xing-lian-biao-2-xun-zhao-huan-de-q-pqtz/

ImmersiveAngela commented 1 year ago

合并两个有序链表:https://leetcode.cn/problems/merge-two-sorted-lists/solutions/2367864/shuang-zhi-zhen-di-gui-he-bing-liang-ge-9y141/

hxingjie commented 1 year ago

21.https://leetcode.cn/problems/merge-two-sorted-lists/solutions/2367534/shuang-zhi-zhen-_he-bing-liang-ge-you-xu-gzs2/ 86.https://leetcode.cn/problems/partition-list/solutions/2367552/fen-ge-lian-biao-by-betodea-wzt8/ 23.https://leetcode.cn/problems/merge-k-sorted-lists/solutions/2367679/he-bing-k-ge-sheng-xu-lian-biao-by-betod-qwbx/ 19.https://leetcode.cn/problems/remove-nth-node-from-end-of-list/solutions/2367715/shan-chu-lian-biao-de-dao-shu-di-n-ge-ji-9z56/ 876.https://leetcode.cn/problems/middle-of-the-linked-list/solutions/2367821/lian-biao-de-zhong-jian-jie-dian-by-beto-4quo/ 141.https://leetcode.cn/problems/linked-list-cycle/solutions/2367876/huan-xing-lian-biao-by-betodea-gp4u/ 142.https://leetcode.cn/problems/linked-list-cycle-ii/solutions/2367910/huan-xing-lian-biao-ii-by-betodea-t2ba/ 160.https://leetcode.cn/problems/intersection-of-two-linked-lists/solutions/2367972/xiang-jiao-lian-biao-by-betodea-kgs0/

Xiaolin8991 commented 1 year ago

1.环形链表https://leetcode.cn/problems/linked-list-cycle/solutions/2367442/python3ti-jie-by-xiao-lin-mz-1he7/

Sadwy commented 1 year ago

LC21. https://leetcode.com/problems/merge-two-sorted-lists/solutions/3847112/merge-two-sorted-lists/

Catboss1999 commented 1 year ago

21.合并有序链表: https://leetcode.cn/problems/merge-two-sorted-lists/solutions/2367320/he-bing-liang-ge-you-xu-lian-biao-chang-h18r9/ 86.分隔链表: https://leetcode.cn/problems/partition-list/solutions/2367560/fen-ge-lian-biao-ti-jie-by-cat-boss-mstd/ 19.删除链表的倒数n个元素: https://leetcode.cn/problems/remove-nth-node-from-end-of-list/solutions/2367574/shan-chu-lian-biao-de-dao-shu-di-nge-yua-pnvh/ 876.链表的中间节点: https://leetcode.cn/problems/middle-of-the-linked-list/solutions/2367603/lian-biao-de-zhong-jian-jie-dian-kuai-ma-inoc/

Abbyyuan01 commented 1 year ago

21.合并有序链表: https://leetcode.cn/problems/merge-two-sorted-lists/solutions/2368157/21-he-bing-liang-ge-you-xu-lian-biao-ti-gs37g/ 86.分隔链表: https://leetcode.cn/problems/partition-list/solutions/2368224/fen-ge-lian-biao-ti-jie-by-abbyyuan01-bmxk/

AlanKang98 commented 1 year ago

https://leetcode.cn/problems/merge-two-sorted-lists/solutions/2368231/liang-ge-lian-biao-shuang-zhi-zhen-by-al-u302/

Jingzhenzxz commented 1 year ago

https://leetcode.cn/problems/reverse-linked-list/solutions/2368197/zhu-shi-xiang-xi-by-distracted-buck5nb-xncm/

sukhfskehwefisfsenkfn commented 1 year ago

86 https://leetcode.cn/problems/partition-list/solutions/2368244/jie-jue-fang-fa-by-bao-tu-6-np3j/

imzhuting commented 1 year ago

https://leetcode.cn/problems/linked-list-cycle/solutions/2368300/kuai-man-zhi-zhen-pan-duan-shi-fou-you-h-3rc9/

Adrian0999 commented 1 year ago

merge sorted lists:https://leetcode.com/problems/merge-two-sorted-lists/solutions/3847753/merge-sorted-lists/

LexieZhou commented 1 year ago

86: https://leetcode.com/problems/partition-list/solutions/3847855/java-two-pointers-approach/

cs-gavin-huang commented 1 year ago

https://leetcode.com/problems/merge-two-sorted-lists/solutions/3847911/merge-two-sorted-lists-in-java/

ghost commented 1 year ago

https://leetcode.cn/problems/partition-list/solutions/2368355/shuang-zhi-zhen-lian-biao-he-bing-by-ala-bbuz/ https://leetcode.cn/problems/merge-two-sorted-lists/solutions/2367393/shuang-zhi-zhen-lian-biao-he-bing-by-ala-0igs/

wangyin717 commented 1 year ago

合并两个有序链表(C++) https://leetcode.cn/problems/merge-two-sorted-lists/solutions/2367710/21-he-bing-liang-ge-you-xu-lian-biao-c-b-1ubo/ 分隔链表(C++) https://leetcode.cn/problems/partition-list/solutions/2368126/86-fen-ge-lian-biao-c-by-wangyin717-myry/ 合并 K 个升序链表(C++) https://leetcode.cn/problems/merge-k-sorted-lists/solutions/2368296/23-he-bing-k-ge-sheng-xu-lian-biao-c-by-o8oy7/ 删除链表的倒数第 N 个结点 https://leetcode.cn/problems/remove-nth-node-from-end-of-list/solutions/2368402/19-shan-chu-lian-biao-de-dao-shu-di-n-ge-waz3/

skyc26 commented 1 year ago

https://leetcode.cn/problems/partition-list/solutions/2368412/problem-86-fen-ge-lian-biao-fen-liang-ge-75or/

azDev120 commented 1 year ago

876: https://leetcode.com/problems/middle-of-the-linked-list/solutions/3848097/simple-two-pointers-approach/ 160: https://leetcode.com/problems/intersection-of-two-linked-lists/solutions/3848188/simple-java-one-pass-solution-with-a-hashset/ 142: https://leetcode.com/problems/linked-list-cycle-ii/solutions/3848415/two-simple-java-solution/

jiuxi521 commented 1 year ago

题解:https://leetcode.cn/problems/remove-nth-node-from-end-of-list/solutions/2368544/shi-fou-ying-gai-shi-yong-xu-ni-tou-jie-7ovea/

haiqiang2017 commented 1 year ago

141.https://leetcode.cn/problems/linked-list-cycle/solutions/2368439/kuai-man-zhi-zhen-by-i2everent-morsel1s-sbyk/ 142.https://leetcode.cn/problems/linked-list-cycle-ii/solutions/2368584/shuang-zhi-zhen-by-i2everent-morsel1s-ivx4/

javaSnacks commented 1 year ago

https://leetcode.cn/problems/partition-list/solutions/2368596/dan-lian-biao-fen-jie-by-su-su-shu-shu-m740/