Implement a new non-greedy algorithm for endless carousels. sip