given sorted circularly linked list how would you insert an element in it?
Anonymous
Will it work for this: 1->2->3->1 and try to insert 4?? 1) To make it work for above scenario, you need to insert this at the end and link it to head. (if code execution comes out of while loop) Just curious, why do we need to find the head? Can't we do both conditions check while traversing only once and insert appropriately in a sorted manner.
Check out your Company Bowl for anonymous work chats.