목록LeetCode (568)
넘치게 채우기
https://leetcode.com/problems/max-chunks-to-make-sorted/description/leetcode - Max Chunks To Make Sorted문제 유형: 그리디, 브루트 포스문제 난이도: Medium 문제You are given an integer array arr of length n that represents a permutation of the integers in the range [0, n - 1].We split arr into some number of chunks (i.e., partitions), and individually sort each chunk. After concatenating them, the result should equa..
https://leetcode.com/problems/final-prices-with-a-special-discount-in-a-shop/description/leetcode - Final Prices With a Special Discount in a Shop문제 유형: 구현문제 난이도: Easy 문제You are given an integer array prices where prices[i] is the price of the ith item in a shop.There is a special discount for items in the shop. If you buy the ith item, then you will receive a discount equivalent to prices[j] wh..
https://leetcode.com/problems/construct-string-with-repeat-limit/description/leetcode - Construct String With Repeat Limit문제 유형: 우선순위 큐, 그리디, 문자열 처리문제 난이도: Medium 문제You are given a string s and an integer repeatLimit. Construct a new string repeatLimitedString using the characters of s such that no letter appears more than repeatLimit times in a row. You do not have to use all characters from s...
https://leetcode.com/problems/final-array-state-after-k-multiplication-operations-i/description/leetcode - Final Array State After K Multiplication Operations I문제 유형: 구현, 그리디문제 난이도: Easy 문제You are given an integer array nums, an integer k, and an integer multiplier.You need to perform k operations on nums. In each operation:Find the minimum value x in nums. If there are multiple occurrences of t..
https://leetcode.com/problems/maximum-average-pass-ratio/description/leetcode - Maximum Average Pass Ratio문제 유형: 우선순위 큐, 그리디문제 난이도: Medium 문제There is a school that has classes of students and each class will be having a final exam. You are given a 2D integer array classes, where classes[i] = [passi, totali]. You know beforehand that in the ith class, there are totali total students, but only pas..
https://leetcode.com/problems/continuous-subarrays/description/leetcode - Continuous Subarrays문제 유형: 슬라이딩 윈도우, 모노토닉 스택, 모노토닉 큐, 모노토닉 데크문제 난이도: Medium 문제You are given a 0-indexed integer array nums. A subarray of nums is called continuous if:Let i, i + 1, ..., j be the indices in the subarray. Then, for each pair of indices i 0 Return the total number of continuous subarrays.A subarray is a cont..
https://leetcode.com/problems/find-score-of-an-array-after-marking-all-elements/description/?envType=daily-question&envId=2024-12-13leetcode - Find Score of an Array After Marking All Elements문제 유형: 우선순위 큐문제 난이도: Medium 문제You are given an array nums consisting of positive integers.Starting with score = 0, apply the following algorithm:Choose the smallest integer of the array that is not marked. ..
https://leetcode.com/problems/take-gifts-from-the-richest-pile/description/leetcode - Take Gifts From the Richest Pile문제 유형: 우선순위 큐문제 난이도: Easy 문제You are given an integer array gifts denoting the number of gifts in various piles. Every second, you do the following:Choose the pile with the maximum number of gifts.If there is more than one pile with the maximum number of gifts, choose any.Leave be..
https://leetcode.com/problems/maximum-beauty-of-an-array-after-applying-operation/description/leetcode - Maximum Beauty of an Array After Applying Operation문제 유형: 정렬, 슬라이딩 윈도우문제 난이도: Medium 문제You are given a 0-indexed array nums and a non-negative integer k.In one operation, you can do the following:Choose an index i that hasn't been chosen before from the range [0, nums.length - 1].Replace nums..
https://leetcode.com/problems/find-longest-special-substring-that-occurs-thrice-i/description/leetcode - Find Longest Special Substring That Occurs Thrice I문제 유형: 문자열 처리, 슬라이딩 윈도우문제 난이도: Medium 문제You are given a string s that consists of lowercase English letters.A string is called special if it is made up of only a single character. For example, the string "abc" is not special, whereas the stri..