iT邦幫忙

2025 iThome 鐵人賽

DAY 23
0

題目介紹:

  • 編號:141
  • 類型:Linked List、Two Pointers
  • 難度:easy
  • 題目連結:https://leetcode.com/problems/linked-list-cycle/
  • 描述:給定一個鏈結串列的起始節點head ,判斷此串列中是否存在環(cycle)
    環的定義:如果某個節點可以經由不斷地沿著next 連接回到自己,表示串列中存在環

成功截圖:
https://ithelp.ithome.com.tw/upload/images/20251007/20178840urhiyuS2mC.jpg

notion筆記截圖
https://ithelp.ithome.com.tw/upload/images/20251007/20178840dFCnvUZr97.jpghttps://ithelp.ithome.com.tw/upload/images/20251007/20178840L1uJRi4SkZ.jpg


上一篇
<DAY22> - Merge Two Sorted Lists
系列文
「用 LeetCode 挑戰 30 天,打造扎實的程式邏輯力」- 結合Notion記錄學習筆記23
圖片
  熱門推薦
圖片
{{ item.channelVendor }} | {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友留言

立即登入留言