Linked list k reverse approach

can you please elaborate that how the reverse function is working and whats the need to update head function??

Hey @Nisha21
Please see this link for better understanding https://www.geeksforgeeks.org/reverse-a-list-in-groups-of-given-size/