알고리즘🅰/리트코드
[리트코드] 33. Search in Rotated Sorted Array
개발조각
2022. 10. 1. 21:06
728x90
반응형
문제
https://leetcode.com/problems/search-in-rotated-sorted-array/
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
이번 문제는 설명할 것도 없어서 소스코드만 올리고 끝내겠습니다.
소스코드
var search = function(nums, target) {
return nums.findIndex(x=> x === target);
};
728x90
반응형