Meta Interview Question

Given a singly linked, sorted list of Integral numbers, write an algorithm that into the appropriate list, consider that the list is or might be circularly linked.

Interview Answer

Anonymous

Aug 28, 2024

using two pointers, so when I detect that the list has looped around ( when the number decreases) I can go back to the precious pointer and insert the number in the correct position.