Question
There is a circular pizza with 3n slices of given sizes. You and two friends pick in rounds: you pick a slice, then your friend Alice (always) takes the slice clockwise-adjacent to yours, then friend Bob takes the slice counter-clockwise-adjacent. This repeats n times until all slices are gone. Maximize the total size of the slices you pick. The list length is a multiple of 3, between 3 and 500.
max_pizza_slices(slices: list[int]) → int[[1,2,3,4,5,6]]out10State your approach and its time/space complexity out loud before you optimize. Handle the edge cases (empty input, duplicates, overflow), and say why you chose this over the brute force. Green tests are the floor, not the grade.
Vibe coding: describe the solution in plain language (or narrate it) and the coach grades your approach. Generating runnable code from your description is coming next.