Computer Science, asked by 14manpreet, 9 months ago

Write an algorithm to insert a node into sorted order in linked list.

Answers

Answered by Anonymous
8

Answer:

Let input linked list is sorted in increasing order. 1) If Linked list is empty then make the node as head and return it. 2) If the value of the node to be inserted is smaller than the value of the head node, then insert the node at the start and make it head.

Similar questions