Programming Examples

Algorithm for insert a node at the end of the singly linked list


1.  Allocate memory for the new node.

2.  Assign a value to the data field of the new node.

3.  If START is NULL (if the list is empty), then:        

  a. Make START point to the new node.

b. Make LAST point to the new node.

c. Go to the step 6.

4.  Make the next field of LAST point to the new node.

5.  Mark the new node as LAST.

6.  Make the next field of the new node point to NULL.

Output

CCC Online Test 2021 CCC Practice Test Hindi Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Best Java Training Institute in Prayagraj (Allahabad) Best Python Training Institute in Prayagraj (Allahabad) O Level Online Test in Hindi Bank SSC Railway TET UPTET Question Bank career counselling in allahabad Sarkari Naukari Notification Best Website and Software Company in Allahabad Sarkari Exam Quiz