diff --git a/Inserting node at tai; of linked list b/Inserting node at tai; of linked list new file mode 100644 index 0000000..f3df2c7 --- /dev/null +++ b/Inserting node at tai; of linked list @@ -0,0 +1,20 @@ +Node Insert(Node head,int data) +{ +Node tmp = new Node(); +tmp.data = data; +tmp.next = null; + +if(head == null) +{ + head = tmp; + return head; +} + +Node current = head; +while(current.next != null) +{ + current = current.next; +} +current.next = tmp; +return head; +}