리트코드 (3) 썸네일형 리스트형 [LeetCode] 17. Letter Combinations of a Phone Number (그래프) 문제 https://leetcode.com/problems/letter-combinations-of-a-phone-number/ Letter Combinations of a Phone Number - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 2에서 9까지의 숫자를 포함한 문자열이 주어진다. 각 숫자에는 문자가 매핑된다. 전화번호로 조합 가능한 모든 문자를 출력하자. 풀이 1 - 중복 조합 product 두 개 이상의 리스트의 모든 조합을 구할 때 사용하는 .. [LeetCode] 200. Number of Islands (그래프) 문제 https://leetcode.com/problems/number-of-islands/ Number of Islands - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com "1"이 땅이고, "0"이 바다이다. 섬은 "1"로 이루어지고, "0"에 둘러싸여 있다. 섬의 개수를 구하자. DFS 풀이 몇 년 전에 그래프 열심히 풀었었던 기억을 되살려 풀어보았다. 내가 알고 있는 풀이와 책의 풀이가 좀 다르다. DFS 버전과 BFS 버전을 만들었다. from coll.. [LeetCode] 937. Reorder Data in Log Files (문자열 조작) 문제 https://leetcode.com/problems/reorder-data-in-log-files/ Reorder Data in Log Files - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com logs 배열을 입력으로 받는다. 각 로그는 단어의 집합으로 이루어지는데 각 단어들은 공백으로 구분된다. 그리고 첫 번째 단어는 '식별자'라고 부른다. 로그는 두 가지 종류로 나뉜다. 1. Letter-logs : 식별자를 제외한 모든 단어들은 영어 소문자로 구.. 이전 1 다음