Solution in Java and C
Code
# Code
```java []
class Solution {
    public List<Integer> mostVisited(int n, int[] rounds) {
        List<Integer> Result = new ArrayList<>();
        int start = rounds[0];
        int end = rounds[rounds.length - 1];

        if (start <= end) {
            for (int i = start; i <= end; i++)
                Result.add(i);
        } else {
            for (int i = 1; i <= end; i++)
                Result.add(i);
            for (int i = start; i <= n; i++)
                Result.add(i);
        }

        return Result;
    }
}
```
```C []
int* mostVisited(int n, int* rounds, int roundsSize, int* returnSize) {
    int* Result = malloc(sizeof(int) * n);
    int start = rounds[0];
    int end = rounds[roundsSize - 1];

    int index = 0;
    if (start <= end) {
        for (int i = start; i <= end; i++) {
            Result[index++] = i;
        }
    } else {
        for (int i = 1; i <= end; i++)
            Result[index++] = i;
        for (int i = start; i <= n; i++)
            Result[index++] = i;
    }

    *returnSize = index;
    return Result;
}
```
['Array', 'Math', 'C', 'Java']