Tag Archives: circular linked list

Sorted insert for circular linked list

Sorted insert for circular linked list

Given a sorted circular linked list, insert a new node so that it remains a sorted circular linked list.
Algorithm:
  • Iterate through the list and
  • Find position to insert

Latest Source Code:
Github: InsertInSortedCLL.java


Output:

10 18 20 
2 10 12 18 20 32