Niloy007

Search Insert Position

Mar 14th, 2021
561
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class Solution {
  2. public:
  3.     int searchInsert(vector<int>& nums, int target) {
  4.         int lo = lower_bound(nums.begin(), nums.end(), target) - nums.begin();
  5.         return lo;
  6.     }
  7. };
RAW Paste Data