LL - k linked list reverse showing run time error

https://ide.codingblocks.com/s/80678 showing runtime error

There was a slight mistake in the reverse function of your code, I have modified your code, kindly try to submit it now