You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This discussion was converted from issue #56 on September 15, 2026 11:03.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Problem link
https://leetcode.com/problems/design-underground-system/
Problem Summary
checkin, checkout을 통해 두 도시간의 평균 시간을 구하는 문제
Solution
그냥 간단하다. checkin 할 때는 map으로 id가 들어온 시각을 저장한 후 checkout 할때 해당 구간에 대해 걸린 시간과 카운트를 누적해서 더해주면 평균을 쉽게 구할 수 있다.
Source Code
All reactions