Technical Interview

Added Recently
Data Structures
Google & Microsoft
C/C++ Questions
Java Interview Questions
Quantitative Problems
Featured Articles
Amazon Interview Question
Compaq Interview Question
Technical Interview
Interview Process
Introduction Questions
Object Oriented
Google Pages
Fundamental Questions
Resume Tips
Contact Us
Submit Question/Answer

How do you reverse a linked list without using any C pointers?


 One way is to reverse the data in the nodes without changing the pointers themselves. One can also create a new linked list which is the reverse of the original linked list. A simple C program can do that for you. Please note that you would still use the "next" pointer fields to traverse through the linked list (So in effect, you are using the pointers, but you are not changing them when reversing the linked list).