@@ -0,0 +1,950 @@
+package com.hackerrank.contests.daysOfCode_30;%0A%0Aimport java.util.Scanner;%0A%0Aclass Node %7B%0A%09int data;%0A%09Node next;%0A%0A%09Node(int d) %7B%0A%09%09data = d;%0A%09%09next = null;%0A%09%7D%0A%0A%7D%0A%0Apublic class Day15_LinkedList %7B%0A%0A%09public static Node insert(Node head, int data) %7B%0A%09%09// Complete this method%0A%0A%09%09if (head == null) %7B%0A%09%09%09head = new Node(data);%0A%09%09%09%0A%09%09%7D else %7B%0A%09%09%09Node firstNode = head;%0A%09%09%09while (firstNode.next != null) %7B%0A%09%09%09%09firstNode = firstNode.next;%0A%09%09%09%7D%0A%09%09%09firstNode.next = new Node(data);%0A%09%09%7D%0A%0A%09%09return head;%0A%09%7D%0A%0A%09public static void display(Node head) %7B%0A%09%09Node start = head;%0A%09%09while (start != null) %7B%0A%09%09%09System.out.print(start.data + %22 %22);%0A%09%09%09start = start.next;%0A%09%09%7D%0A%09%7D%0A%0A%09public static void main(String%5B%5D args) %7B%0A%09%09// TODO Auto-generated method stub%0A%0A%09%09@SuppressWarnings(%22resource%22)%0A%09%09Scanner sc = new Scanner(System.in);%0A%09%09Node head = null;%0A%09%09int T = sc.nextInt();%0A%09%09while (T-- %3E 0) %7B%0A%09%09%09int ele = sc.nextInt();%0A%09%09%09head = insert(head, ele);%0A%09%09%7D%0A%09%09display(head);%0A%0A%09%7D%0A%0A%7D%0A

Create Day15_LinkedList.java