We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Reversing a doubly linked list is all about carefully swapping next and prev for each node, one wrong move and the whole chain breaks. How did you handle the pointer swap without losing track of the list?
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Reverse a doubly linked list
You are viewing a single comment's thread. Return to all comments →
Reversing a doubly linked list is all about carefully swapping next and prev for each node, one wrong move and the whole chain breaks. How did you handle the pointer swap without losing track of the list?