I am trying to get the index of the max element after left rotation. However the code is taking way too long to execute and the test time out after some time lets say this is my