Comments on: Recursive function to reverse a linked list https://demo.ritambhara.in/recursive-function-to-reverse-a-linked-list/ Coding / System Design Interviews Thu, 17 Mar 2016 05:12:21 +0000 hourly 1 https://wordpress.org/?v=6.7.2 By: deepika https://demo.ritambhara.in/recursive-function-to-reverse-a-linked-list/#comment-1717 Thu, 17 Mar 2016 05:12:21 +0000 http://www.ritambhara.in/?p=321#comment-1717 In reply to deepika.

we must be doing this assignment only in the first iteration
*head = rest;

]]>
By: deepika https://demo.ritambhara.in/recursive-function-to-reverse-a-linked-list/#comment-1716 Thu, 17 Mar 2016 05:11:14 +0000 http://www.ritambhara.in/?p=321#comment-1716 For reversing the linked-list code, I think the head will point to the 2nd element in the input list.
Please correct me if i am wrong.

]]>