diff options
author | Jack Sangdahl <[email protected]> | 2025-02-03 15:37:19 -0700 |
---|---|---|
committer | Jack Sangdahl <[email protected]> | 2025-02-03 15:37:19 -0700 |
commit | 55a67f776dd9acd258cae16ffb636751666b0f40 (patch) | |
tree | 601539de43809b70ceb8228a12c35883fa300b03 /search_insert_pos.cpp | |
parent | a0030873dabb517594ae0394350d6715071f7fb8 (diff) | |
download | leetcode-55a67f776dd9acd258cae16ffb636751666b0f40.tar.gz leetcode-55a67f776dd9acd258cae16ffb636751666b0f40.zip |
chore: Remove incomplete solutions
Diffstat (limited to 'search_insert_pos.cpp')
-rw-r--r-- | search_insert_pos.cpp | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/search_insert_pos.cpp b/search_insert_pos.cpp deleted file mode 100644 index f6768a5..0000000 --- a/search_insert_pos.cpp +++ /dev/null @@ -1,20 +0,0 @@ -#include "leetcode.h" - -class Solution { -public: - int searchInsert(vector<int> &nums, int target) { - int low = 0, high = nums.size() - 1; - while (low <= high) { - int mid = low + (high - low) / 2; - if (nums[mid] == target) - return mid; - else if (nums[mid] > target) - high = mid - 1; - else - low = mid + 1; - } - return low; - } -}; - -int main() {} |