CodeMentor
.
Ask AI
Problems
Learn
C++
TCS
Core CS
HR
Progress
Search
Ctrl
K
0
Lv 1
Problems
Binary Search
Search Insert Position
Easy
LeetCode
2/3
00:00
Hint
Run
Ctrl
↵
Submit
Description
Lesson
Code walk
Solution
Easy
Binary Search
LeetCode #35
Search Insert Position
Lower bound: first index where nums[i] >= target.
Examples
Example 1
Input
4 5 1 3 5 6
Output
2
Example 2
Input
4 2 1 3 5 6
Output
1
Stuck? Take a nudge
Reveal hint 1 of 3
C++17
Autosaves
Reset
Console
Run your code to see results