목록DFS (82)
넘치게 채우기
https://www.acmicpc.net/problem/3485BOJ - Play on Words문제 유형: 그래프 이론, 오일러 경로, 오일러 회로, dfs문제 난이도: Gold III시간 제한: 1초메모리 제한: 256MB 문제Some of the secret doors contain a very interesting word puzzle. The team of archaeologists has to solve it to open that doors. Because there is no other way to open the doors, the puzzle is very important for us.There is a large number of magnetic plates on every doo..
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/cDchLO/btsJZ8TvEQS/kxSdq1AV66sfeCqKyOG2XK/img.png)
https://www.acmicpc.net/problem/6907BOJ - Floor Plan문제 유형: BFS, DFS, 그래프, 정렬문제 난이도: Silver I시간 제한: 1초메모리 제한: 128MB 문제The floor plan of a house shows rooms separated by walls. This floor plan can be transferred to a grid using the character I for walls and . for room space. Doorways are not shown. Each I or . character occupies one square metre.In this diagram, there are six rooms.You have been g..
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/bj2dLv/btsJHoiZqJX/MdNR9ERWsMpZL4OIFCH7kk/img.png)
https://leetcode.com/problems/extra-characters-in-a-string/description/?envType=daily-question&envId=2024-09-23leetcode - Extra Characters in a String문제 유형 : 문자열 처리, 재귀, dp문제 난이도 : Medium 문제You are given a 0-indexed string s and a dictionary of words dictionary. You have to break s into one or more non-overlapping substrings such that each substring is present in dictionary. There may be some ex..
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/bHHjdT/btsJGlN1LLs/Bd2V3WYKFUfyvMzN8ccLKK/img.png)
https://leetcode.com/problems/k-th-smallest-in-lexicographical-order/description/?envType=daily-question&envId=2024-09-22leetcode - K-th Smallest in Lexicographical Order문제 유형 : 트리, dfs, 수학문제 난이도 : Hard 문제Given two integers n and k, return the kth lexicographically smallest integer in the range [1, n]. 두 개의 정수 n과 k가 주어진다. 범위 [1,n]에서 사전순으로 k번째로 작은 정수를 반환하시오. 풀이순차적으로 k개를 찾는 것은 느리다.대신, 점프를 할 필요가 있다..
https://leetcode.com/problems/lexicographical-numbers/description/?envType=daily-question&envId=2024-09-21leetcode - Lexicographical Numbers문제 유형 : 수학, 구현, dfs, 재귀문제 난이도 : Medium 문제Given an integer n, return all the numbers in the range [1, n] sorted in lexicographical order.You must write an algorithm that runs in O(n) time and uses O(1) extra space. 정수 n이 주어진다. [1, n]의 모든 숫자들을 사전순으로 정렬하여 반환하시..
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/E7h92/btsJD6ceHm5/Ehw5EJHGxMvLr6TCCCRHd1/img.png)
https://www.acmicpc.net/problem/11183BOJ - Coast Length문제 유형 : BFS, DFS, 행렬, 구현문제 난이도 : Silver I 문제The island municipality of Soteholm is required to write a plan of action for their work with emission of greenhouse gases. They realize that a natural first step is to decide whether they are for or against global warming. For this purpose they have read the IPCC report on climate change and found..
https://leetcode.com/problems/count-sub-islands/description/?envType=daily-question&envId=2024-08-28leetcode - Count Sub Islands문제 유형 : bfs/dfs, 행렬문제 난이도 : Medium 문제You are given two m x n binary matrices grid1 and grid2 containing only 0's (representing water) and 1's (representing land). An island is a group of 1's connected 4-directionally (horizontal or vertical). Any cells outside of the gr..
https://leetcode.com/problems/n-ary-tree-postorder-traversal/description/?envType=daily-question&envId=2024-08-26leetcode - N-ary Tree Postorder Traversal문제 유형 : 트리, dfs, 재귀, 스택문제 난이도 : Easy 문제Given the root of an n-ary tree, return the postorder traversal of its nodes' values.Nary-Tree input serialization is represented in their level order traversal. Each group of children is separated by the ..
https://leetcode.com/problems/combination-sum-ii/description/?envType=daily-question&envId=2024-08-13leetcode - Combination Sum II문제 유형 : 백트래킹, dfs, 재귀문제 난이도 : Medium 문제Given a collection of candidate numbers (candidates) and a target number (target), find all unique combinations in candidates where the candidate numbers sum to target.Each number in candidates may only be used once in the combin..
https://leetcode.com/problems/minimum-number-of-days-to-disconnect-island/description/leetcode - Minimum Number of Days to Disconnect Island문제 유형 : bfs / dfs, 그리디문제 난이도 : Hard 문제You are given an m x n binary grid grid where 1 represents land and 0 represents water. An island is a maximal 4-directionally (horizontal or vertical) connected group of 1's.The grid is said to be connected if we have e..