there pizza 3n slice vary size friend slice pizza followsyou pick pizza sliceYour friend Alice pick slice anticlockwise direction pickyour friend Bob pick slice clockwise direction pickrepeat slice pizzasgiven integer array slice represent size pizza slice clockwise direction return maximum possible sum slice size pick Example 1input slice 123456output 10explanation Pick pizza slice size 4 Alice Bob pick slice size 3 5 respectively then Pick slice size 6 finally Alice Bob pick slice size 2 1 respectively total 4 6example 2input slice 898611output 16explanation Pick pizza slice size 8 turn if pick slice size 9 partner pick slice size 8 Constraints3 n sliceslength1 sliceslength 5001 slicesi 1000