You are viewing a single comment's thread. Return to all comments →
My Java solution with linear time complexity and constant space complexity using recursion:
public static void reversePrint(SinglyLinkedListNode llist) { if(llist == null) return; reversePrint(llist.next); System.out.println(llist.data); }
Seems like cookies are disabled on this browser, please enable them to open this website
Print in Reverse
You are viewing a single comment's thread. Return to all comments →
My Java solution with linear time complexity and constant space complexity using recursion: