leozzmc / Blog_Reply

For Blog Reply
0 stars 0 forks source link

posts/22bf447e #9

Open utterances-bot opened 1 month ago

utterances-bot commented 1 month ago

二元搜尋法 | ✅ 704. Binary Search | LeetCode | Kevin Liu's 部落格 || Technical || Travel

題目敘述 題目中有一個整數陣列 nums, 這個陣列是以排序的陣列,並且在這當中想要找到 target 這個元素的 index, 如果沒找到就回傳 -1。並且要求所實現的演算法其實時間複雜度為 $O(Log n)$ 解法我的作法123456789101112131415161718192021222324252627282930int search(int* nums, int numsSize,

https://leozzmc.github.io/posts/22bf447e.html

ShannonHung commented 1 month ago

牛逼