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.
Print in Reverse
Print in Reverse
Sort by
recency
|
973 Discussions
|
Please Login in order to post a comment
solution
function reversePrint(llist) { // Write your code here if (llist === null) { return } else { // reverse the list let current = llist; let prev = null;
}
Here is my c++ solution, you can watch the vidéo explanation here : https://youtu.be/WO7Uz7sQML4
Here is my recursive call on next node for JAVA
Python recursion Solution def reversePrint(llist): if llist.next is None: print(llist.data) else: reversePrint(llist.next) print(llist.data)
Did it with simple vector in C++