1560. Most Visited Sector in a Circular Track
Last updated
Last updated
**Input:** n = 4, rounds = [1,3,1,2]
**Output:** [1,2]
**Explanation:** The marathon starts at sector 1. The order of the visited sectors is as follows:
1 --> 2 --> 3 (end of round 1) --> 4 --> 1 (end of round 2) --> 2 (end of round 3 and the marathon)
We can see that both sectors 1 and 2 are visited twice and they are the most visited sectors. Sectors 3 and 4 are visited only once.**Input:** n = 2, rounds = [2,1,2,1,2,1,2,1,2]
**Output:** [2]**Input:** n = 7, rounds = [1,3,5,7]
**Output:** [1,2,3,4,5,6,7]