Java Solution
```java \nclass Solution {\n    public List mostVisited(int n, int[] rounds) {\n        int[] a = new int[n+1];\n        for(int i=0;i<rounds.length-1;i++)\n   
```java \nclass Solution {\n    public List<Integer> mostVisited(int n, int[] rounds) {\n        int[] a = new int[n+1];\n        for(int i=0;i<rounds.length-1;i++)\n        {\n            calc(rounds[i+1],rounds[i],a,n);\n        }\n        a[rounds[rounds.length-1]]++;\n        int max=0;\n        for(int i=0;i<a.length;i++)\n        {\n            if(a[i]>a[max])\n            {\n              max=i;  \n            }\n        }\n        ArrayList<Integer> list = new ArrayList<Integer>();\n        for(int i=0;i<a.length;i++)\n        {\n            if(a[i]==a[max])\n            {\n              list.add(i);  \n            }\n        }\n        return list;\n    }\n    \n    private void calc(int end,int start,int[] a,int n)\n    {\n        int i=start;\n        while(i!=end)\n        {\n            a[i]++;\n            if(i==n)\n                i=0;\n            i++;\n        }\n    }\n}
[]