Skip to content

Commit be0becc

Browse files
committed
feat: find-minimum-in-rotated-sorted-array solution
1 parent ca5a8d9 commit be0becc

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
class Solution {
2+
public int findMin(int[] nums) {
3+
int min = Integer.MAX_VALUE;
4+
5+
for (int i = 0; i < nums.length; i++) {
6+
if (nums[i] < min) {
7+
min = nums[i];
8+
}
9+
}
10+
return min;
11+
}
12+
}

0 commit comments

Comments
 (0)