Skip to content

Conversation

@jeeneee
Copy link
Contributor

@jeeneee jeeneee commented Nov 16, 2020

📘 풀이한 문제
  • 10165 버스 노선

⭐ 문제에서 주로 사용한 알고리즘
  • 그리디 알고리즘, 덱

📜 대략적인 코드 설명
  • 출발, 도착 시간 관련된 일반적인 그리디 문제에 원형을 추가한 문제이다.
  • 출발 시간 기준으로 오름차 정렬을 하는데 도착시간이 출발 시간보다 작으면 n을 더해주고 최대 값을 갱신해준다. (출발 시간이 같은 경우 도착 시간 기준 내림차 정렬)
  • 원형이 아닌 일자라고 생각하고 포함되는 노선을 제외한 노선들을 덱에 넣어준다.
  • 덱의 앞에서부터 도착 시간이 최대값보다 작으면 꺼내준다.

@jjangsungwon jjangsungwon added the problem-solved Indication that this problem is solved label Nov 16, 2020
@jjangsungwon jjangsungwon merged commit f673116 into CodeTest-StudyGroup:master Nov 16, 2020
@jeeneee jeeneee deleted the test branch November 16, 2020 06:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

problem-solved Indication that this problem is solved

2 participants