diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..0e3dd98 Binary files /dev/null and b/.DS_Store differ diff --git a/Linked-List/.DS_Store b/Linked-List/.DS_Store new file mode 100644 index 0000000..420c7f3 Binary files /dev/null and b/Linked-List/.DS_Store differ diff --git a/Linked-List/.idea/.gitignore b/Linked-List/.idea/.gitignore new file mode 100644 index 0000000..26d3352 --- /dev/null +++ b/Linked-List/.idea/.gitignore @@ -0,0 +1,3 @@ +# Default ignored files +/shelf/ +/workspace.xml diff --git a/Linked-List/.idea/Linked-List.iml b/Linked-List/.idea/Linked-List.iml new file mode 100644 index 0000000..d6ebd48 --- /dev/null +++ b/Linked-List/.idea/Linked-List.iml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/Linked-List/.idea/misc.xml b/Linked-List/.idea/misc.xml new file mode 100644 index 0000000..639900d --- /dev/null +++ b/Linked-List/.idea/misc.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Linked-List/.idea/modules.xml b/Linked-List/.idea/modules.xml new file mode 100644 index 0000000..0e229f4 --- /dev/null +++ b/Linked-List/.idea/modules.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/Linked-List/.idea/runConfigurations.xml b/Linked-List/.idea/runConfigurations.xml new file mode 100644 index 0000000..797acea --- /dev/null +++ b/Linked-List/.idea/runConfigurations.xml @@ -0,0 +1,10 @@ + + + + + + \ No newline at end of file diff --git a/Linked-List/.idea/vcs.xml b/Linked-List/.idea/vcs.xml new file mode 100644 index 0000000..6c0b863 --- /dev/null +++ b/Linked-List/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Linked-List/LinkedList.java b/Linked-List/LinkedList.java new file mode 100644 index 0000000..d410dfc --- /dev/null +++ b/Linked-List/LinkedList.java @@ -0,0 +1,31 @@ +class LinkedList { + Node head; + + + static class Node { + int data; + Node next; + Node(int d) + { + data = d; + next = null; + } + } + + public static void main(String[] args) + { + LinkedList list = new LinkedList(); + + list.head = new Node(1); + Node second = new Node(2); + Node third = new Node(3); + + + + list.head.next = second; + + + second.next + = third; + } +