Unable to Troubleshoot the code

It is showing a run time error which i am not able to find or troubleshoot please tell the mistake in the code and help me rectify it.
The link for the my code is-

Hi @sidkaushal35
You are facing run time error because of Reversing_k_Elements function.

I have made few changes in your code and also mentioned reasons for that, kindly have a look on it.