목록LeetCode (535)
넘치게 채우기
https://leetcode.com/problems/longest-square-streak-in-an-array/description/?envType=daily-question&envId=2024-10-28leetcode - Longest Square Streak in an Array문제 유형: 해시, 집합, 이진 탐색, 다이나믹 프로그래밍문제 난이도: Medium 문제You are given an integer array nums. A subsequence of nums is called a square streak if:The length of the subsequence is at least 2, andafter sorting the subsequence, each element (except t..
https://leetcode.com/problems/count-square-submatrices-with-all-ones/description/?envType=daily-question&envId=2024-10-27leetcode - Count Square Submatrices with All Ones문제 유형: 다이나믹 프로그래밍, 행렬문제 난이도: Medium 문제Given a m * n matrix of ones and zeros, return how many square submatrices have all ones.m * n의 크기의 0과 1로만 이루어진 행렬이 있다. 몇 개의 1로만 이루어진 정사각형 부분행렬이 존재하는지 구하시오. 풀이우선, 1인 칸 하나하나는 각각 자신, 즉 1x1의 부분..
https://leetcode.com/problems/height-of-binary-tree-after-subtree-removal-queries/description/?envType=daily-question&envId=2024-10-26leetcode - Height of Binary Tree After Subtree Removal Queries문제 유형: 재귀, dfs, 다이나믹 프로그래밍문제 난이도: Hard 문제You are given the root of a binary tree with n nodes. Each node is assigned a unique value from 1 to n. You are also given an array queries of size m.You have to..
https://leetcode.com/problems/remove-sub-folders-from-the-filesystem/description/?envType=daily-question&envId=2024-10-25leetcode - Remove Sub-Folders from the Filesystem문제 유형: 문자열 처리, 그리디, 트라이(Trie)문제 난이도: Medium 문제Given a list of folders folder, return the folders after removing all sub-folders in those folders. You may return the answer in any order.If a folder[i] is located within another fo..
https://leetcode.com/problems/flip-equivalent-binary-trees/?envType=daily-question&envId=2024-10-24leetcode - Flip Equivalent Binary Trees문제 유형: 이진트리, bfs, dfs, 재귀문제 난이도: Medium 문제For a binary tree T, we can define a flip operation as follows: choose any node, and swap the left and right child subtrees.A binary tree X is flip equivalent to a binary tree Y if and only if we can make X equal to Y ..
https://leetcode.com/problems/cousins-in-binary-tree-ii/description/?envType=daily-question&envId=2024-10-23leetcode - Cousins in Binary Tree II문제 유형: 트리, bfs문제 난이도: Medium 문제Given the root of a binary tree, replace the value of each node in the tree with the sum of all its cousins' values.Two nodes of a binary tree are cousins if they have the same depth with different parents.Return the root o..
https://leetcode.com/problems/kth-largest-sum-in-a-binary-tree/description/?envType=daily-question&envId=2024-10-22leetcode - Kth Largest Sum in a Binary Tree문제 유형: BFS, 우선순위 큐문제 난이도: Medium 문제You are given the root of a binary tree and a positive integer k.The level sum in the tree is the sum of the values of the nodes that are on the same level.Return the kth largest level sum in the tree (not..
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..