목록LeetCode (568)
넘치게 채우기
https://leetcode.com/problems/maximum-sum-of-distinct-subarrays-with-length-k/description/?envType=daily-question&envId=2024-11-19leetcode - Maximum Sum of Distinct Subarrays With Length K문제 유형: 슬라이딩 윈도우문제 난이도: Medium 문제You are given an integer array nums and an integer k. Find the maximum subarray sum of all the subarrays of nums that meet the following conditions:The length of the subarray is..
https://leetcode.com/problems/defuse-the-bomb/description/?envType=daily-question&envId=2024-11-18leetcode - Defuse the Bomb문제 유형: 구현문제 난이도: Easy 문제You have a bomb to defuse, and your time is running out! Your informer will provide you with a circular array code of length of n and a key k.To decrypt the code, you must replace every number. All the numbers are replaced simultaneously.If k > 0, re..
https://leetcode.com/problems/shortest-subarray-with-sum-at-least-k/description/?envType=daily-question&envId=2024-11-17leetcode - Shortest Subarray with Sum at Least K문제 유형: 슬라이딩 윈도우, 부분합, 모노토닉 데크문제 난이도: Hard 문제Given an integer array nums and an integer k, return the length of the shortest non-empty subarray of nums with a sum of at least k. If there is no such subarray, return -1.A subarray is..
https://leetcode.com/problems/find-the-power-of-k-size-subarrays-i/description/?envType=daily-question&envId=2024-11-16leetcode - Find the Power of K-Size Subarrays I문제 유형: 슬라이딩 윈도우문제 난이도: Medium 문제You are given an array of integers nums of length n and a positive integer k.The power of an array is defined as:Its maximum element if all of its elements are consecutive and sorted in ascending orde..
https://leetcode.com/problems/shortest-subarray-to-be-removed-to-make-array-sorted/description/?envType=daily-question&envId=2024-11-15leetcode - Shortest Subarray to be Removed to Make Array Sorted문제 유형: 그리디, 투 포인터문제 난이도: Medium 문제Given an integer array arr, remove a subarray (can be empty) from arr such that the remaining elements in arr are non-decreasing.Return the length of the shortest sub..
https://leetcode.com/problems/minimized-maximum-of-products-distributed-to-any-store/description/?envType=daily-question&envId=2024-11-14leetcode - Minimized Maximum of Products Distrivbuted to Any Store문제 유형: 이진 탐색문제 난이도: Medium 문제You are given an integer n indicating there are n specialty retail stores. There are m product types of varying amounts, which are given as a 0-indexed integer array ..
https://leetcode.com/problems/count-the-number-of-fair-pairs/description/?envType=daily-question&envId=2024-11-13leetcode - Count the Number of Fair Pairs문제 유형: 정렬, 이진탐색, 투 포인터문제 난이도: Medium 문제Given a 0-indexed integer array nums of size n and two integers lower and upper, return the number of fair pairs.A pair (i, j) is fair if:0 lower n짜리 크기의 0-indexed의 배열 nums와 두 정수 lower와 upper가 주어집니다.fair한 ..
https://leetcode.com/problems/most-beautiful-item-for-each-query/description/?envType=daily-question&envId=2024-11-12leetcode - Most Beautiful Item for Each Query문제 유형: 정렬, 이진 탐색문제 난이도: Medium 문제You are given a 2D integer array items where items[i] = [pricei, beautyi] denotes the price and beauty of an item respectively.You are also given a 0-indexed integer array queries. For each queries[j], y..
https://leetcode.com/problems/prime-subtraction-operation/description/?envType=daily-question&envId=2024-11-11leetcode - Prime Subtraction Operation문제 유형: 정수론, 수학, 그리디문제 난이도: Medium 문제You are given a 0-indexed integer array nums of length n.You can perform the following operation as many times as you want:Pick an index i that you haven’t picked before, and pick a prime p strictly less than nums[..
https://leetcode.com/problems/shortest-subarray-with-or-at-least-k-ii/description/?envType=daily-question&envId=2024-11-10leetcode - Shortest Subarray With OR at Least K II문제 유형: 비트마스킹, 슬라이딩 윈도우문제 난이도: Medium 문제You are given an array nums of non-negative integers and an integer k.An array is called special if the bitwise OR of all of its elements is at least k.Return the length of the shortest s..