■ Algorithm
-
[알고리즘] #Symmetric Tree■ Algorithm 2019. 5. 28. 09:00
출처 : https://leetcode.com/problems/symmetric-tree/ Symmetric 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 Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center). Note: Bonus points if you could solve it both recursively and iterative..
-
[알고리즘] #위장■ Algorithm 2019. 5. 26. 10:50
출처: https://programmers.co.kr/learn/courses/30/lessons/42578 알고리즘 연습 - 위장 | 프로그래머스 programmers.co.kr 문제 설명 스파이들은 매일 다른 옷을 조합하여 입어 자신을 위장합니다. 예를 들어 스파이가 가진 옷이 아래와 같고 오늘 스파이가 동그란 안경, 긴 코트, 파란색 티셔츠를 입었다면 다음날은 청바지를 추가로 입거나 동그란 안경 대신 검정 선글라스를 착용하거나 해야 합니다. 종류이름 얼굴 동그란 안경, 검정 선글라스 상의 파란색 티셔츠 하의 청바지 겉옷 긴 코트 스파이가 가진 의상들이 담긴 2차원 배열 clothes가 주어질 때 서로 다른 옷의 조합의 수를 return 하도록 solution 함수를 작성해주세요. 제한사항 cloth..
-
[알고리즘] #Printer Queue■ Algorithm 2019. 5. 26. 10:08
출처: https://programmers.co.kr/learn/courses/30/lessons/42587 알고리즘 연습 - 프린터 | 프로그래머스 일반적인 프린터는 인쇄 요청이 들어온 순서대로 인쇄합니다. 그렇기 때문에 중요한 문서가 나중에 인쇄될 수 있습니다. 이런 문제를 보완하기 위해 중요도가 높은 문서를 먼저 인쇄하는 프린터를 개발했습니다. 이 새롭게 개발한 프린터는 아래와 같은 방식으로 인쇄 작업을 수행합니다. 1. 인쇄 대기목록의 가장 앞에 있는 문서(J)를 대기목록에서 꺼냅니다. 2. 나머지 인쇄 대기목록에서 J보다 중요도가 높은 문서가 한 개라도 존재하면 J를 대기목록의 가장 마지막에 programmers.co.kr 문제 설명 일반적인 프린터는 인쇄 요청이 들어온 순서대로 인쇄합니다. 그..
-
[알고리즘] #Maximum Depth of N-ary Tree■ Algorithm 2019. 5. 22. 10:00
출처 :https://leetcode.com/problems/maximum-depth-of-n-ary-tree/ Maximum Depth of N-ary 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 문제 Given a n-ary tree, find its maximum depth. The maximum depth is the number of nodes along the longest path from the root node down to the..
-
[알고리즘] #Minimum Depth of Binary Tree■ Algorithm 2019. 5. 22. 08:59
출처: https://leetcode.com/problems/minimum-depth-of-binary-tree/ Minimum Depth of Binary 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 문제 Given a binary tree, find its minimum depth. The minimum depth is the number of nodes along the shortest path from the root node down to..
-
[알고리즘] #Increasing Order Search Tree■ Algorithm 2019. 5. 20. 00:45
출처: https://leetcode.com/problems/increasing-order-search-tree/ Increasing Order Search 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 문제 Given a tree, rearrange the tree in in-order so that the leftmost node in the tree is now the root of the tree, and every node has no le..
-
[알고리즘] #Maximum Depth of Binary Tree■ Algorithm 2019. 5. 19. 22:50
출처 : https://leetcode.com/problems/maximum-depth-of-binary-tree/ Maximum Depth of Binary 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 Given a binary tree, find its maximum depth. The maximum depth is the number of nodes along the longest path from the root node down to th..