분류 전체보기49 162. Find Peak Element c++ 문제 A peak element is an element that is strictly greater than its neighbors. Given an integer array nums, find a peak element, and return its index. If the array contains multiple peaks, return the index to any of the peaks. You may imagine that nums[-1] = nums[n] = -∞. You must write an algorithm that runs in O(log n) time. 피크 요소는 이웃보다 엄격하게 큰 요소입니다. 정수 배열 nums가 주어지면 피크 요소를 찾고 해당 인덱스를 반환합니다. 배열에 여러.. 2022. 6. 21. 88. Merge Sorted Array c++ 문제 88. Merge Sorted Array You are given two integer arrays nums1 and nums2, sorted in non-decreasing order, and two integers m and n, representing the number of elements in nums1 and nums2 respectively. Merge nums1 and nums2 into a single array sorted in non-decreasing order. The final sorted array should not be returned by the function, but instead be stored inside the array nums1. To accommodate .. 2022. 6. 20. 75. Sort Colors LeetCode C++ https://leetcode.com/problems/sort-colors/description/ Sort Colors - 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 Given an array nums with n objects colored red, white, or blue, sort them in-place so that objects of the same color are adjacent, with the colors in the order red, .. 2022. 6. 20. Leetcode 704번 Find Pivot Index 해설 https://leetcode.com/problems/find-pivot-index/ Find Pivot Index - 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 724. Find Pivot Index 정수 배열이 주어지면 이 배열의 피벗 인덱스를 계산합니다. 피벗 인덱스는 인덱스 왼쪽에 있는 모든 숫자의 합이 인덱스 오른쪽에 있는 모든 숫자의 합과 같은 인덱스입니다. 인덱스가 배열의 왼쪽 가장자리에 있으면 왼쪽에 요소가 없기 때문에 왼쪽 합계는 0입니다. .. 2022. 6. 19. 이전 1 2 3 4 5 6 7 ··· 13 다음