Skip to content

Commit 78704ff

Browse files
chore: 개행추가
1 parent 81fa87e commit 78704ff

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

find-minimum-in-rotated-sorted-array/grapefruitgreentealoe.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
2-
31
/*
42
회전한 데이터에서 제일 작은 값을 찾는 문제라는 것을 기억해야한다.
53
그렇게 때문에, left, right를 각각 0, nums.length -1 로 두어서, left와 right가 같아질때 탈출하고, 그 같아진 index에 대한 nums[index]를 찾아내면 될 것 같다.
@@ -28,4 +26,4 @@ function findMin(nums) {
2826
return nums[left]; // 또는 nums[right]도 같음
2927
}
3028
//시간복잡도 : 이진탐색을 썼으므로 O(logn)
31-
//공간복잡도 : O(1)
29+
//공간복잡도 : O(1)

0 commit comments

Comments
 (0)