1.

 A linked list is formed from the objects of the class,  class Node { into info; Node link; }Write an algorithm OR a Method for deleting a node from a linked list. The method declaration is given below : void delete node (Node start)

Answer»

Algorithm 

(i) Copy the content of the next mode into the mode that has to be deleted. 

(ii) Assign the next pointer of the newly copied node of the next pointer of the node from the content has been copied. 

(iii) Delete the node from the data has copied.



Discussion

No Comment Found

Related InterviewSolutions