Java Solution faster than 100%
The approach is we will track the changes in only one element(perm[1]==1) of perm array instead of tracking all the elemnt of array.\n\nclass Solution {\n    pu
The approach is we will track the changes in only one element(perm[1]==1) of perm array instead of tracking all the elemnt of array.\n```\nclass Solution {\n    public int reinitializePermutation(int n) {\n            \n        int opCount=0;\n        int i=1;\n       do{\n           if(i%2==0)\n               i=i/2;\n           else \n               i=(n/2)+(i-1)/2;\n           \n    opCount++;\n       } while(i!=1);\n        \n        return opCount;\n    }   \n}\n```
[]