Question: Write a comment for every line whats operation are done? just comment I. Lab #4 singly linked list ans.pdf > currentthis.head: while (current -null) System.out.print
I. Lab #4 singly linked list ans.pdf > currentthis.head: while (current -null) System.out.print (current.getElementO) current -current.getNext O System.out-printinO z /Reversing a singly linked 1ist without using any recursion public void Reverse) NodecE> current head: NodecE prev - null: NodecE nextNode: while (current-nul1) nextNode current.getNext o: current.setNext (prev) prev currenti current-nextNode: tail-head; head = prev
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
