Computer Science, asked by satendrarajput8702, 11 months ago

Write a function to reverse a singly linked list.

Answers

Answered by gursimran551
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