이분탐색

알고리즘

[LeetCode] 153. Find Minimum in Rotated Sorted Array

🎨 문제 오름차순으로 정렬된 배열을 회전시킨 배열이 주어진다. 해당 배열의 최소값을 찾는 문제이다. 단, 시간복잡도는 O(logN) Find Minimum in Rotated Sorted Array - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 📘 풀이 [LeetCode] 33. Search in Rotated Sorted Array 🎨 문제 중복이 없는 정렬된 배열이 있다. 이 중 하나의 값을 피벗으로 배열을 회전시킨다. 그리고 회전된 배열에서 target..

알고리즘

[LeetCode] 33. Search in Rotated Sorted Array

🎨 문제 중복이 없는 정렬된 배열이 있다. 이 중 하나의 값을 피벗으로 배열을 회전시킨다. 그리고 회전된 배열에서 target 값의 인덱스를 반환하는 문제이다. (단, 시간복잡도는 O(logN)) Search in Rotated Sorted Array - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 📘 풀이 O(logN)의 시간복잡도를 갖는 알고리즘은 보통 이진 탐색을 말한다. 이진 탐색의 경우의 경우 정렬된 배열에서 사용할 수 있다. 하지만 배열이 문제의 배..

acisliver
'이분탐색' 태그의 글 목록