iT邦幫忙

2025 iThome 鐵人賽

DAY 24
0

題目介紹

  • 編號:704
  • 類型:Array, Binary Search
  • 難度:easy
  • 題目連結:https://leetcode.com/problems/binary-search/description/
  • 描述:給定一個已排序的整數陣列 nums 和一個整數 target,使用二分搜尋法,在陣列中尋找 target,並回傳索引位置。 如果找不到 target,則回傳 -1。

解題成功截圖
https://ithelp.ithome.com.tw/upload/images/20251008/20178840j5zkamgmCu.jpg

notion筆記截圖
https://ithelp.ithome.com.tw/upload/images/20251008/20178840jRhYNAtT35.jpghttps://ithelp.ithome.com.tw/upload/images/20251008/20178840SLc31HdzJT.jpg


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

尚未有邦友留言

立即登入留言