목록LeetCode (566)
넘치게 채우기
https://leetcode.com/problems/maximize-the-number-of-partitions-after-operations/description/?envType=daily-question&envId=2025-10-17leetcode - Maximize the number of partitions after operations문제 유형: 누적 합, 비트마스킹문제 난이도: Hard 문제You are given a string s and an integer k.First, you are allowed to change at most one index in s to another lowercase English letter.After that, do the following partitio..
https://leetcode.com/problems/find-the-minimum-amount-of-time-to-brew-potions/description/?envType=daily-question&envId=2025-10-09Leetcode - Find the Minimum Amount of Time to Brew Potions문제 유형: 다이나믹 프로그래밍문제 난이도: Medium 문제You are given two integer arrays, skill and mana, of length n and m, respectively.In a laboratory, n wizards must brew m potions in order. Each potion has a mana capacity mana[..
https://leetcode.com/problems/count-the-number-of-arrays-with-k-matching-adjacent-elements/description/?envType=daily-question&envId=2025-06-17leetcode - Count the Number of Arrays with K Matching Adjacent Elemetns문제 유형: 조합론, 수학문제 난이도: Hard 문제You are given three integers n, m, k. A good array arr of size n is defined as follows:Each element in arr is in the inclusive range [1, m].Exactly k indic..
https://leetcode.com/problems/maximum-difference-between-even-and-odd-frequency-ii/description/?envType=daily-question&envId=2025-06-11leetcode - Maximum Difference Between Even and Odd Frequency II문제 유형: 비트마스크, 브루트 포스, 누적합, 슬라이딩 윈도우문제 난이도: Hard 문제You are given a string s and an integer k. Your task is to find the maximum difference between the frequency of two characters, freq[a] - freq[b], in ..
https://leetcode.com/problems/maximize-the-number-of-target-nodes-after-connecting-trees-ii/description/?envType=daily-question&envId=2025-05-29leetcode - Maximize the Number of Target Nodes After Connecting Trees II문제 유형: bfs, dfs, 이분 그래프, 그래프, 코드문제 난이도: Hard 문제There exist two undirected trees with n and m nodes, labeled from [0, n - 1] and [0, m - 1], respectively.You are given two 2D integer ..
https://leetcode.com/problems/largest-color-value-in-a-directed-graph/description/?envType=daily-question&envId=2025-05-26leetcode - Largest Color Value in a Directed Graph문제 유형: 위상 정렬, BFS, 다이나믹 프로그래밍문제 난이도: Hard 문제There is a directed graph of n colored nodes and m edges. The nodes are numbered from 0 to n - 1.You are given a string colors where colors[i] is a lowercase English letter represent..
https://leetcode.com/problems/find-the-count-of-good-integers/description/BOJ - Find the Count of Good Integers문제 유형: 조합론, 정수론, 수학, 브루트포스, 백트래킹, 비트마스킹문제 난이도: Hard 문제You are given two positive integers n and k.An integer x is called k-palindromic if:x is a palindrome.x is divisible by k.An integer is called good if its digits can be rearranged to form a k-palindromic integer. For example, for k =..
https://leetcode.com/problems/put-marbles-in-bags/description/?envType=daily-question&envId=2025-03-31leetcode - Put Marbles in Bags문제 유형: 그리디, 정렬, 구현문제 난이도: Hard 문제You have k bags. You are given a 0-indexed integer array weights where weights[i] is the weight of the ith marble. You are also given the integer k.Divide the marbles into the k bags according to the following rules:No bag is empty.I..
https://leetcode.com/problems/apply-operations-to-maximize-score/description/leetcode - Apply Operations to Maximize Score문제 유형: 모노토닉 스택, 스택, 그리디, 정수론, 정렬문제 난이도: Hard 문제You are given an array nums of n positive integers and an integer k.Initially, you start with a score of 1. You have to maximize your score by applying the following operation at most k times:Choose any non-empty subarray nums[l,..
https://leetcode.com/problems/maximum-number-of-points-from-grid-queries/description/leetcode - Maximum Number of Points From Grid Queries문제 유형: 우선순위 큐, bfs, 그리디문제 난이도: Hard 원래 LeetCode문제를 leetcode solution탭에만 올리고 티스토리에 더 이상 안올리려 했는데..앞으로 인상깊은 문제만 올리려합니다 문제 You are given an m x n integer matrix grid and an array queries of size k.Find an array answer of size k such that for each integer queries[..