Top G | L3 Phone Screen (TPS) | London
Anonymous User
1975

I am so unlucky, linkedlist was probably the only topic I left, and got a question from that. It was like this-

You're building a music playlist app where songs are arranged in a circular queue sorted by popularity score in non-decreasing order. Each song knows the next song, and the last links back to the first. Given a reference to any song in the playlist and a new song’s score, insert it such that the playlist remains sorted and circular

Please lmk how to solve this

Comments (13)