Linked List Reversal (Is it Easy………..?)
In our C-programming classes we had been doing lots of programs using linked list. In the initial classes of linked lists the programs we were made to do were things like insertion, deletion, searching of nodes of a linked list. Later we get on to reversal of a given linked list and most of us do it comfortably when given without any constrains. This program can be made a bit interesting and may even be a brainteaser for beginners if we add a condition that only one extra variable can be used within the function reverse (head). I wrote one program for the same and is given below. node * reverse(node * head) { node * t = head; if(t == null) return null; ...