@@ -0,0 +1,906 @@
+package data_structures.linked_lists;%0D%0A%0D%0A/*%0D%0A * Input Format:%0D%0A * You have to complete the void Print(Node* head) method which takes one%0D%0A * argument: the head of the linked list. You should not read any input from%0D%0A * stdin/console. The struct Node has a data part which stores the data and a%0D%0A * next pointer which points to the next element of the linked list. There are%0D%0A * multiple test cases. For each test case, this method will be called%0D%0A * individually.%0D%0A * %0D%0A * Output Format:%0D%0A * Print the elements of the linked list to stdout/console (using printf or%0D%0A * cout). Print one per line.%0D%0A * %0D%0A * Sample Input: %0D%0A * NULL%0D%0A * 1-%3E2-%3E3-%3ENULL%0D%0A * %0D%0A * Sample Output: %0D%0A * 1%0D%0A * 2%0D%0A * 3%0D%0A */%0D%0Apublic class PrintElementsOfALinkedList %7B%0D%0A%0D%0A%09void Print(Node head) %7B%0D%0A%09%09while (head != null) %7B%0D%0A%09%09%09System.out.println(head.data);%0D%0A%09%09%09head = head.next;%0D%0A%09%09%7D%0D%0A%0D%0A%09%7D%0D%0A%7D%0D%0A%0D%0Aclass Node %7B%0D%0A%09int data;%0D%0A%09Node next;%0D%0A%7D

Add PrintElementsOfALinkedList