Easy to understand solution
IntuitionApproachComplexity
Time complexity:

Space complexity:
Code
# Intuition
<!-- Describe your first thoughts on how to solve this problem. -->

# Approach
<!-- Describe your approach to solving the problem. -->

# Complexity
- Time complexity:
<!-- Add your time complexity here, e.g. $$O(n)$$ -->

- Space complexity:
<!-- Add your space complexity here, e.g. $$O(n)$$ -->

# Code
```typescript []
function mostVisited(n: number, rounds: number[]): number[] {
    let roundsCount: number[] = new Array(n).fill(0);
    roundsCount[rounds[0]-1]++;

    for (let i = 1; i < rounds.length; i++) {
        let right = rounds[i] > rounds[i-1] ? rounds[i] : rounds[i] + n;
        for (let j = rounds[i-1]+1; j <= right; j++) {
            if (j <= n) roundsCount[j-1]++;
            else roundsCount[(j%n)-1]++;
        }
    }

    let max: number = Math.max(...roundsCount);
    let res: number[] = [];
    roundsCount.forEach((round, idx) => {
        if (round === max) res.push(idx+1);
    });

    return res;
};
```
['TypeScript']