전체 글
-
[Leetcode] 922. Sort Array By Parity II 문제 풀이Algorithm/문제풀이 2021. 9. 28. 23:39
https://leetcode.com/problems/sort-array-by-parity-ii/ Sort Array By Parity II - 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 문제 내용 i가 홀수이면 num[i] 도 홀수로, i가 짝수이면 num[i] 도 짝수가 되도록 정렬하는 문제 Example 1: Input: nums = [4,2,5,7] Output: [4,5,2,7] Explanation: [4,7,2,5], [2,5,4,7], [2,7..
-
[Leetcode] 929. Unique Email Addresses 문제 풀이Algorithm/문제풀이 2021. 9. 27. 20:27
https://leetcode.com/problems/unique-email-addresses/ Unique Email Addresses - 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 문제 내용 이메일에 문자가 섞여있는데 문자를 규칙에 따라 제거했을 때 남은 이메일은 몇개인지 찾는 문제 Example 1: Input: emails = ["test.email+alex@leetcode.com","test.e.mail+bob.cathy@leetcode.com","..
-
[Leetcode] Shortest Path in a Grid with Obstacles Elimination 문제 풀이Algorithm/문제풀이 2021. 9. 25. 17:23
https://leetcode.com/problems/shortest-path-in-a-grid-with-obstacles-elimination/ Shortest Path in a Grid with Obstacles Elimination - 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 문제 내용 장애물을 피해서 최단거리를 찾는 문제인데 k번 만큼 장애물을 제거하고 갈 수 있다. 그렇게 했을 때 최단거리를 구하는 문제 Example 1: Input: grid =..
-
[Docker][Error] 해결책 Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?카테고리 없음 2021. 9. 24. 23:11
문제 mac에서 docker 를 실행하려고 하니 Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? 이러한 에러가 발생했다. 원인 docker service 가 실행이 되지 않아서 발생했다고 한다. mac은 docker container를 실행하기 위해 가상머신처럼 하나 올리고 실행한다고 들은게 생각났다. 그래서 그런지 linux와 다르게 뭔가 해줘야하는듯하다. linux에서는 systemctl을 사용해서 start했었다. 해결 docker 앱을 실행하며 된다. 앱을 실행하고 고래 아이콘이 보이면 동작중인듯하다.
-
맥에 Docker 설치하기카테고리 없음 2021. 9. 24. 16:59
다운로드하기 https://hub.docker.com/editions/community/docker-ce-desktop-mac Docker Desktop for Mac by Docker | Docker Hub We and third parties use cookies or similar technologies ("Cookies") as described below to collect and process personal data, such as your IP address or browser information. You can learn more about how this site uses Cookies by reading our privacy policy hub.docker.com 사이트에 가면 ma..
-
[Leetcode] 1137. N-th Tribonacci Number 문제 풀이Algorithm/문제풀이 2021. 9. 24. 16:38
https://leetcode.com/problems/n-th-tribonacci-number/ N-th Tribonacci 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 문제 내용 피보나치 수열처럼 3개를 더한 값을 다음으로 쓰는 수열에서 N 번째 수 구하기 Example 1: Input: n = 4 Output: 4 Explanation: T_3 = 0 + 1 + 1 = 2 T_4 = 1 + 1 + 2 = 4 문제 풀이 단순히 반복문을 돌리면..
-
[Leetcode] 572. Subtree of Another Tree 문제 풀이Algorithm/문제풀이 2021. 9. 22. 22:33
https://leetcode.com/problems/subtree-of-another-tree/ Subtree of Another Tree - 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 문제 내용 tree에서 subtree가 있는지 검사하는 문제 Example 1: Input: root = [3,4,5,1,2], subRoot = [4,1,2] Output: true 문제 풀이 tree가 일치하는 지 매칭하기 위해 dfs탐색으로 풀었다. 먼저 subroot..