Practice Pizza With 3n Slices
Read the task, work through the examples, and check your approach against the constraints. Use the original LeetCode task for coding and submissions.
Problem Statement
The circular pizza has 3 * n slices whose sizes are listed clockwise in slices. In each round, you choose any remaining slice; Alice then takes the neighboring remaining slice counterclockwise from your choice, and Bob takes the neighboring remaining slice clockwise from your choice. Repeat until the pizza is gone. Return the greatest total size of slices you can obtain.
Source: Pizza With 3n Slices on LeetCode. Use the original task for its coding environment and submissions.
Examples
# Example 1
slices = [1,2,3,4,5,6]
10
# Example 2
slices = [8,9,8,6,1,1]
16
Constraints
Related LeetCode Problems
Practice more problems similar to Pizza With 3n Slices.
Review your practice with PhantomCodeAI
After trying the problem yourself, use the app to discuss your approach, complexity, and edge cases.