MCPcopy Create free account
hub / github.com/MisterBooo/LeetCodeAnimation / Solution1

Class Solution1

problems/0035-search-insert-position/Code/1.java:1–11  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1class Solution1 {
2 public int searchInsert(int[] nums, int target) {
3 int i=0;
4 for(;i<nums.length;i++){
5 if (nums[i]>=target){
6 break;
7 }
8 }
9 return i;
10 }
11}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected