You are viewing a single comment's thread. Return to all comments →
This is the perfect way to understand recursive
public static void reversePrint(SinglyLinkedListNode llist) { if(llist != null){ 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 →
This is the perfect way to understand recursive
public static void reversePrint(SinglyLinkedListNode llist) { if(llist != null){ reversePrint(llist.next); System.out.println(llist.data); } }