Reverse A Linkedlist
You have given a pointer to the head node of a linked list, the task is to reverse the linked list.Input Format
We need to reverse the list by changing the links between nodes.
1->2->3->4->5->6->7->nullOutput Format
7->6->5->4->3->2->1->nullQuestion Video
0 <= N <= 10^6Sample Input
7Sample Output
1 2 3 4 5 6 7
7 6 5 4 3 2 1
-
Asked in Companies
-
Related Topics
Video Solution
Code Solution
{ }
{ }
Run