목록LeetCode (568)
넘치게 채우기
https://leetcode.com/problems/split-a-string-into-the-max-number-of-unique-substrings/description/?envType=daily-question&envId=2024-10-21leetcode - Split a String Into the Max Number of Unique Substrings문제 유형: 백트래킹, 재귀, dfs, 해시, 문자열 처리문제 난이도: Medium 문제Given a string s, return the maximum number of unique substrings that the given string can be split into.You can split string s into any list of ..
https://leetcode.com/problems/parsing-a-boolean-expression/description/?envType=daily-question&envId=2024-10-20leetcode - Parsing A Boolean Expression문제 유형: 문자열 처리, 스택, 구현문제 난이도: Hard 문제A boolean expression is an expression that evaluates to either true or false. It can be in one of the following shapes:'t' that evaluates to true.'f' that evaluates to false.'!(subExpr)' that evaluates to the log..
https://leetcode.com/problems/find-kth-bit-in-nth-binary-string/description/leetcode - Find Kth Bit in Nth Binary String문제 유형: 비트 조작, 재귀, 문자열 처리문제 난이도: Medium 문제Given two positive integers n and k, the binary string Sn is formed as follows:S1 = "0"Si = Si - 1 + "1" + reverse(invert(Si - 1)) for i > 1Where + denotes the concatenation operation, reverse(x) returns the reversed string x, and invert..
https://leetcode.com/problems/count-number-of-maximum-bitwise-or-subsets/description/leetcode - Count Number of Maximum Bitwise-OR Subsets문제 유형: dfs, 재귀, 브루트 포스, 백트래킹, 완전탐색, 비트마스킹문제 난이도: Medium 문제Given an integer array nums, find the maximum possible bitwise OR of a subset of nums and return the number of different non-empty subsets with the maximum bitwise OR.An array a is a subset of an array ..
https://leetcode.com/problems/maximum-swap/description/leetcode - Maximum Swap문제 유형: 그리디, 수학문제 난이도: Medium 문제You are given an integer num. You can swap two digits at most once to get the maximum valued number.Return the maximum valued number you can get. 정수 num을 입력받습니다. 자릿수에서 두 개의 숫자를 바꿔서 최대값의 숫자로 변환할 수 있습니다.얻을 수 있는 최대값의 숫자를 출력하시오. 풀이브루트 포스 방법과, 인덱스를 이용한 방법이 있다.브루트 포스로는, 자릿수마다 다 한 번씩 스왑해보면서 최대 값..
https://leetcode.com/problems/longest-happy-string/description/?envType=daily-question&envId=2024-10-16leetcode - Longest Happy String문제 유형: 우선순위 큐, 그리디문제 난이도: Medium 문제A string s is called happy if it satisfies the following conditions:s only contains the letters 'a', 'b', and 'c'.s does not contain any of "aaa", "bbb", or "ccc" as a substring.s contains at most a occurrences of the letter 'a'...
https://leetcode.com/problems/separate-black-and-white-balls/description/?envType=daily-question&envId=2024-10-15leetcode - Separate Black and White Balls문제 유형: 투 포인터, 그리디문제 난이도 : Medium 문제There are n balls on a table, each ball has a color black or white.You are given a 0-indexed binary string s of length n, where 1 and 0 represent black and white balls, respectively.In each step, you can choos..
https://leetcode.com/problems/maximal-score-after-applying-k-operations/description/?envType=daily-question&envId=2024-10-14leetcode - Maximal Score After Applying K Operations문제 유형: 우선순위 큐, 그리디문제 난이도: Medium 문제You are given a 0-indexed integer array nums and an integer k. You have a starting score of 0.In one operation:choose an index i such that 0 increase your score by nums[i], andreplace num..
https://leetcode.com/problems/smallest-range-covering-elements-from-k-lists/description/?envType=daily-question&envId=2024-10-13leetcode - Smallest Range Covering Elements from K Lists문제 유형: 정렬, 슬라이딩 윈도우문제 난이도: Hard 문제You have k lists of sorted integers in non-decreasing order. Find the smallest range that includes at least one number from each of the k lists.We define the range [a, b] is smalle..
https://leetcode.com/problems/divide-intervals-into-minimum-number-of-groups/description/?envType=daily-question&envId=2024-10-12leetcode - Divide Intervals Into Minimum Numbers of Groups문제 유형: 우선순위 큐, 정렬문제 난이도: Medium 문제You are given a 2D integer array intervals where intervals[i] = [lefti, righti] represents the inclusive interval [lefti, righti].You have to divide the intervals into one or mo..