목록다시볼문제 (123)
넘치게 채우기
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/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/build-a-matrix-with-conditions/description/leetcode - Build a Matrix With Conditions문제 유형 : 행렬, 위상 정렬문제 난이도 : Hard 문제You are given a positive integer k. You are also given:a 2D integer array rowConditions of size n where rowConditions[i] = [abovei, belowi], anda 2D integer array colConditions of size m where colConditions[i] = [lefti, righti].The two arrays contain ..
https://leetcode.com/problems/step-by-step-directions-from-a-binary-tree-node-to-another/description/leetcode - Step-By-Step Directions From a Binary Tree Node to Another문제 유형 : 이진트리, 재귀, 백트래킹문제 난이도 : Medium 문제You are given the root of a binary tree with n nodes. Each node is uniquely assigned a value from 1 to n. You are also given an integer startValue representing the value of the start node ..
https://leetcode.com/problems/number-of-atoms/description/leetcode - Number of Atoms문제 유형 : 스택, 재귀, 문자열 처리문제 난이도 : Hard 문제Given a string formula representing a chemical formula, return the count of each atom.The atomic element always starts with an uppercase character, then zero or more lowercase letters, representing the name.One or more digits representing that element's count may follow if th..
https://leetcode.com/problems/robot-collisions/description/leetcode - Robot Collisions문제 유형 : 스택문제 난이도 : Hard 문제There are n 1-indexed robots, each having a position on a line, health, and movement direction.You are given 0-indexed integer arrays positions, healths, and a string directions (directions[i] is either 'L' for left or 'R' for right). All integers in positions are unique.All robots sta..
https://leetcode.com/problems/reverse-substrings-between-each-pair-of-parentheses/description/leetcode - Reverse Substrings Between Each Pair of Parentheses문제 유형 : 스택문제 난이도 : Medium 문제You are given a string s that consists of lower case English letters and brackets.Reverse the strings in each pair of matching parentheses, starting from the innermost one.Your result should not contain any bracket..