Sorting is a technique to order the data in a way such that data will remain in lowest to highest form. There are various techniques involved in sorting data.I have added the implementation of few important sorting techniques. Please click on link to read in detail:-
Adding Node at the End of Linked List:- The method takes two parameter one a head node of a linked list and other data too insert. public void addNodeEnd ( Node head , int data ) { if ( head == null ) { System . out . println ( "list is empty" ); return ; } Node node = new Node ( data ); Node temp = head ; while ( temp . next != null ) { temp = temp . next ; } temp . next = node ; } To Know the basic structure of the linked list click here
Comments
Post a Comment