-
Notifications
You must be signed in to change notification settings - Fork 2
everywhere
bradendubois edited this page Jul 18, 2021
·
7 revisions
ID: everywhere
Difficulty: 1.3
CPU Time: 1 second
Memory: 1024 MB
This is straightforward in understanding, since we just track the number of unique cities in a list. In implementation, one should consider fast ways to track entries to see if they have already appeared or no. A map/dictionary seems fast, where if the city has not been enterred/marked, mark it in the map, and increase the number of unique cities by 1.