Skip to content

Latest commit

 

History

History
22 lines (15 loc) · 703 Bytes

20200106.md

File metadata and controls

22 lines (15 loc) · 703 Bytes

2020. 01. 06

오늘의 문제 :

간격(interval)로 이루어진 배열이 주어지면, 겹치는 간격 원소들을 합친 새로운 배열을 만드시오.

간격은 시작과 끝으로 이루어져 있으며 시작은 끝보다 작거나 같습니다. Given a list of intervals, merge intersecting intervals.

예제)

  • Input: {{2,4}, {1,5}, {7,9}}
  • Output: {{1,5}, {7,9}}
  • Input: {{3,6}, {1,3}, {2,4}}
  • Output: {{1,6}}

풀이 :

소스코드 :