문제 링크 : https://www.hackerrank.com/challenges/projects/problem
문제는 간단하다!
Sample Input
Sample Output
2015-10-28 2015-10-29
2015-10-30 2015-10-31
2015-10-13 2015-10-15
2015-10-01 2015-10-04
이걸 쿼리로 구현해봐라 인데.. 위의 예제를 보면 아래의 그림과 같다
이걸 보면 바로 계층구조 쿼리가 생각 날 것이다
(CONNECT_BY_ISLEAF, CONNECT_BY_ROOT, CONNECT BY PRIOR)
이걸 바탕으로 정렬만 조금 신경쓰면 문제 해결!
=====================================================================================
=====================================================================================
'지식이 늘었다' 카테고리의 다른 글
[Hackerrank - algorithm] Sherlock and Anagrams (0) | 2019.01.19 |
---|---|
[Hackerrank - algorithm] Sherlock and the Valid String (0) | 2019.01.19 |
[Hackerrank - algorithm] Highest Value Palindrome (0) | 2019.01.19 |
[Hackerrank - algorithm] Array Manipulation (0) | 2018.12.03 |
[python] python 3.7 Dictionray의 큰 변화! (0) | 2018.07.19 |