All Perf cases are failing

My solution’s Time complexity

For counting the length

O(n)

For swapping the list aka (Rotating)

O(n - k)

Any clue, if I can do it in even lesser time?

@virali-crio-ta @aritra-crio-ta @krishnadey-crio-ta

Can you try to submit the code again. It looks like your code is correct.

Wow, it got passed. Thanks.

Closing this topic as your issue is resolved by the mentor. If it is still not resolved, Kindly un-mark the accepted solution or create a new topic and post this question as a reference link in the description of the new topic.