Question: Question 1 #1 Look at this code for an insertAtTail. // TACK A NEW NODE (CABOOSE) ONTO THE END OF THE LIST public void
Question 1 #1 Look at this code for an insertAtTail. // TACK A NEW NODE (CABOOSE) ONTO THE END OF THE LIST public void insertAtTail(String data) { } if (head==null) head = new Node( data, null); Node curr= head; while (curr.next!= null) curr = curr.next; curr.next = new Node(data, null); DOES THIS CODE WORK? ASSUME NO NULL STRINGS IN THE LIST AND THE INCOMING DATA NOT A NULL STRING YES 4 pts
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
