목록LeetCode (568)
넘치게 채우기
https://leetcode.com/problems/the-number-of-the-smallest-unoccupied-chair/description/?envType=daily-question&envId=2024-10-11leetcode - The Number of the Smallest Unoccupied Chair문제 유형: 정렬, 우선순위 큐문제 난이도: Medium 문제There is a party where n friends numbered from 0 to n - 1 are attending. There is an infinite number of chairs in this party that are numbered from 0 to infinity. When a friend arrives..
https://leetcode.com/problems/maximum-width-ramp/description/?envType=daily-question&envId=2024-10-10leetcode - Maximum Width Ramp문제 유형 : 스택, 모노토닉 스택문제 난이도 : Medium 문제A ramp in an integer array nums is a pair (i, j) for which i and nums[i] width of such a ramp is j - i.Given an integer array nums, return the maximum width of a ramp in nums. If there is no ramp in nums, return 0. 정수 배열 nums의 ra..
https://leetcode.com/problems/minimum-add-to-make-parentheses-valid/description/?envType=daily-question&envId=2024-10-09LeetCode - Minimum Add to Make Parentheses Valid문제 유형: 스택문제 난이도 : Medium 문제A parentheses string is valid if and only if:It is the empty string,It can be written as AB (A concatenated with B), where A and B are valid strings, orIt can be written as (A), where A is a valid string..
https://leetcode.com/problems/minimum-number-of-swaps-to-make-the-string-balanced/description/?envType=daily-question&envId=2024-10-08leetcode - Minimum Number of Swaps to Make the String Balanced문제 유형: 스택문제 난이도 : Medium 문제You are given a 0-indexed string s of even length n. The string consists of exactly n / 2 opening brackets '[' and n / 2 closing brackets ']'.A string is called balanced if an..
https://leetcode.com/problems/minimum-string-length-after-removing-substrings/description/?envType=daily-question&envId=2024-10-07leetcode - Minimum String Length After Removing Substrings문제 유형 : 스택문제 난이도 : Easy 문제You are given a string s consisting only of uppercase English letters.You can apply some operations to this string where, in one operation, you can remove any occurrence of one of the ..
https://leetcode.com/problems/sentence-similarity-iii/description/?envType=daily-question&envId=2024-10-06leetcode - Sentence Similarity III문제 유형 : 문자열 처리, 투 포인터문제 난이도 : Medium 문제You are given two strings sentence1 and sentence2, each representing a sentence composed of words. A sentence is a list of words that are separated by a single space with no leading or trailing spaces. Each word consist..
https://leetcode.com/problems/permutation-in-string/description/?envType=daily-question&envId=2024-10-05leetcode - Permutation in String문제 유형 : 슬라이딩 윈도우, 해시문제 난이도 : Medium 문제Given two strings s1 and s2, return true if s2 contains a permutation of s1, or false otherwise.In other words, return true if one of s1's permutations is the substring of s2. 두 문자열 s1과 s2가 주어진다.만약 s2가 s1의 순열을 포함한다면 true를, 아..
https://leetcode.com/problems/divide-players-into-teams-of-equal-skill/description/?envType=daily-question&envId=2024-10-04leetcode - Divide Players Into Teams of Equal Skill문제 유형 : 정렬, 그리디, 투 포인터문제 난이도 : Medium 문제You are given a positive integer array skill of even length n where skill[i] denotes the skill of the ith player. Divide the players into n / 2 teams of size 2 such that the total skil..
https://leetcode.com/problems/make-sum-divisible-by-p/description/?envType=daily-question&envId=2024-10-03leetcode - Make Sum Divisible by P문제 유형 : 부분합, 해시문제 난이도 : Medium 문제Given an array of positive integers nums, remove the smallest subarray (possibly empty) such that the sum of the remaining elements is divisible by p. It is not allowed to remove the whole array.Return the length of the small..
https://leetcode.com/problems/rank-transform-of-an-array/description/?envType=daily-question&envId=2024-09-27leetcode - Rank Transform of an Array문제 유형 : 정렬, 이진 탐색문제 난이도 : Easy 문제Given an array of integers arr, replace each element with its rank.The rank represents how large the element is. The rank has the following rules:Rank is an integer starting from 1.The larger the element, the larger the..