C++ || 100% || Explained with Comments
```\nclass Solution {\npublic:\n    /In first attempt index 1 will go to 2(n/2) for n=4,any all other indexes will also get jumbled,\n\tOn observation we will s
```\nclass Solution {\npublic:\n    /*In first attempt index 1 will go to 2(n/2) for n=4,any all other indexes will also get jumbled,\n\tOn observation we will see that if any of the index reaches to its original position then all index will \n\treach to its original position.\n\tSo we will track the movement of any one index and count the no of steps required to reach its original state.*/\n    //Note* first and last index don\'t change their position.\n    int reinitializePermutation(int n) {\n        int prev=1;\n        int count=0;\n        int present=n/2;\n        count=1;\n        while(prev!=present)\n        {\n            if(present%2==0)\n                present=present/2;\n            else\n                present=n/2+(present-1)/2;\n            count++;\n        }\n        return count;\n    }\n};
[]