葉林
Linked with GitHub
# LeetCode - 0035. Search Insert Position ### 題目網址:https://leetcode.com/problems/search-insert-position/ ###### tags: `LeetCode` `Easy` `二分搜尋法(Binary Search)` ```cpp= /* -LeetCode format- Problem: 35. Search Insert Position Difficulty: Easy by Inversionpeter */ class Solution { public: int searchInsert(vector<int>& nums, int target) { return (lower_bound(nums.begin(), nums.end(), target) - nums.begin()); } }; ```
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up