You are viewing a single comment's thread. Return to all comments →
That conditional is a bit ugly, why not
if(head == null) return; ReversePrint(head.next); System.out.println(head.data); // OR if (head != null) { ReversePrint(head.next); System.out.println(head.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 →
That conditional is a bit ugly, why not