8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bc2c564 commit 402a44dCopy full SHA for 402a44d
src/main/java/com/fishercoder/solutions/_35.java
@@ -18,14 +18,16 @@
18
19
public class _35 {
20
21
- public int searchInsert(int[] nums, int target) {
22
- int len = nums.length;
23
- for (int i = 0; i < len; i++) {
24
- if (target <= nums[i]) {
25
- return i;
+ public static class Solution1 {
+ public int searchInsert(int[] nums, int target) {
+ int len = nums.length;
+ for (int i = 0; i < len; i++) {
+ if (target <= nums[i]) {
26
+ return i;
27
+ }
28
}
29
+ return len;
30
- return len;
31
32
33
0 commit comments