Write a function to reverse a singly linked list.
Answers
Answered by
0
steps to reverse a singly linked list . create two more pointers other than head namely prevnode and curnode that will hold the reference of previous node and current node respectively . now disconnect the previous node i.e the first node from other . move head node to its next node i.e head =head-next .
I hope its help you
Similar questions
Science,
6 months ago
History,
6 months ago
Psychology,
11 months ago
Psychology,
11 months ago
Math,
1 year ago
Math,
1 year ago