Linked list K Reverse

I try to reverse the linked list using STL. But i am Getting TLE error.

Refer this approach. Each step is commented

Hi Abha ,Thanks for your reply, But I want solve this in STL. can you please help to advise , how this can be solved using STL ?