목록전체 글 (1208)
넘치게 채우기
https://leetcode.com/problems/range-sum-of-sorted-subarray-sums/description/?envType=daily-question&envId=2024-08-04leetcode - Range Sum of Sorted Subarray Sums문제 유형 : 정렬, 부분합문제 난이도 : Medium 문제You are given the array nums consisting of n positive integers. You computed the sum of all non-empty continuous subarrays from the array and then sorted them in non-decreasing order, creating a new array ..
https://leetcode.com/problems/make-two-arrays-equal-by-reversing-subarrays/description/?envType=daily-question&envId=2024-08-03leetcode - Make Two Arrays Equal by Reversing Subarrays문제 유형 : 정렬문제 난이도 : Easy 문제You are given two integer arrays of equal length target and arr. In one step, you can select any non-empty subarray of arr and reverse it. You are allowed to make any number of steps.Return ..
https://leetcode.com/problems/minimum-swaps-to-group-all-1s-together-ii/description/?envType=daily-question&envId=2024-08-02leetcode - Minimum Swaps to Group All 1's Together II문제 유형 : 슬라이딩 윈도우문제 난이도 : Medium 문제A swap is defined as taking two distinct positions in an array and swapping the values in them.A circular array is defined as an array where we consider the first element and the last ele..
https://leetcode.com/problems/number-of-senior-citizens/description/?envType=daily-question&envId=2024-08-01leetcode - Number of Senior Citizens문제 유형 : 문자열 처리문제 난이도 : Easy 문제You are given a 0-indexed array of strings details. Each element of details provides information about a given passenger compressed into a string of length 15. The system is such that:The first ten characters consist of the ..
https://leetcode.com/problems/filling-bookcase-shelves/?envType=daily-question&envId=2024-07-31leetcode - Filling Bookcase Shelves문제 유형 : 다이나믹 프로그래밍문제 난이도 : Medium 문제You are given an array books where books[i] = [thicknessi, heighti] indicates the thickness and height of the ith book. You are also given an integer shelfWidth.We want to place these books in order onto bookcase shelves that have a..
https://leetcode.com/problems/minimum-deletions-to-make-string-balanced/description/?envType=daily-question&envId=2024-07-30leetcode - Minimum Deletions to Make String Balanced문제 유형 : 다이나믹 프로그래밍문제 난이도 : Medium 문제You are given a string s consisting only of characters 'a' and 'b'.You can delete any number of characters in s to make s balanced. s is balanced if there is no pair of indices (i,j)..
https://leetcode.com/problems/count-number-of-teams/description/?envType=daily-question&envId=2024-07-29leetcode - Count Number of Teams문제 유형 : 투 포인터문제 난이도 : Medium 문제There are n soldiers standing in a line. Each soldier is assigned a unique rating value.You have to form a team of 3 soldiers amongst them under the following rules:Choose 3 soldiers with index (i, j, k) with rating (rating[i], ra..
https://leetcode.com/problems/second-minimum-time-to-reach-destination/description/?envType=daily-question&envId=2024-07-28leetcode - Second Minimum Time to Reach Destination문제 유형 : BFS, 최단서리, 큐문제 난이도 : Hard 문제A city is represented as a bi-directional connected graph with n vertices where each vertex is labeled from 1 to n (inclusive). The edges in the graph are represented as a 2D integer array..
https://leetcode.com/problems/minimum-cost-to-convert-string-i/description/?envType=daily-question&envId=2024-07-27leetcode - Minimum Cost to Convert String I문제 유형 : 문자열 처리, 최단거리, bfs문제 난이도 : Medium 문제You are given two 0-indexed strings source and target, both of length n and consisting of lowercase English letters. You are also given two 0-indexed character arrays original and changed, and an i..
https://leetcode.com/problems/find-the-city-with-the-smallest-number-of-neighbors-at-a-threshold-distance/description/leetcode - Find the City With the Smallest Number of Neighbors at a Threshold Distance문제 유형 : 최단거리, 다익스트라, bfs문제 난이도 : Medium 문제There are n cities numbered from 0 to n-1. Given the array edges where edges[i] = [fromi, toi, weighti] represents a bidirectional and weighted edge bet..