CS 211 - 11/23/15 Lab this week will be available online. Labs can be submitted either in lab on Wednesday or in lecture next Monday for both the Code Review and the lab exercise. Lab Exercise Part 1: Simple Recursive Exercise Changing the order of the recursive call(s) and the work to be done at each level, can have useful impact. Assume we have a linked list to print out the values Rewrite show() from Lab 11 recursively. I need a "helper" function/method class MyList { private MyLNode head; .... public void show () { MyLNode tmp = head; while ( tmp != null ) { System.out.print (tmp.elem + " "); tmp = tmp.next; } System.out.println (); } public void showR () // showR is a helper method { MyLNode tmp = head; MyList.showR_Recursive ( tmp ); // the following might work instead of the above // showR_Recursive ( head ); System.out.println (); } private static void showR_Recursive ( MyLNode tmp ) { if ( tmp != null ) { System.out.print (tmp.elem + " "); showR_Recursive ( tmp.next ); } } public void showRReverse () // showR is a helper method { MyLNode tmp = head; MyList.showRReverse_Recursive ( tmp ); // the following might work instead of the above // showR_Recursive ( head ); System.out.println (); } private static void showRReverse_Recursive ( MyLNode tmp ) { if ( tmp != null ) { showRReverse_Recursive ( tmp.next ); System.out.print (tmp.elem + " "); } }