Given a circular playlist represented as an array of songs of size n, and a starting index, find the minimum number of button presses (moving forward or backward) to reach a target song index.
You've read your 3 free write-ups
Sign up free to keep reading. Your account opens the first 10 questions of every company.