LeetCode---35. Search Insert Position

LeetCode—35. Search Insert Position 題目 https://leetcode.com/problems/search-insert-position/ 給出一個有序數組和一個target,將這個target有序的插入到數組中,返回插入的index。 思路及解法 這道題還是比較簡單的,時間複雜度n的解法很容易。之所以放到博客上來,是因爲看了一個二分查找的方法,降了復
相關文章
相關標籤/搜索