The task involves bursting balloons marked with numbers represented by an array. Each burst earns coins based on the product of adjacent balloon numbers. The goal is to maximize number of coins obtainable by bursting the balloons strategically.
Alice and Bob take turns removing stones from either end of a row. Each player gains points equal to the sum of the remaining stones after their turn. Bob aims to minimize the score difference, while Alice aims to maximize it. The task is to determine the maximum difference between Alice and Bob
Alice and Bob take turns removing stones from a row, aiming to avoid making the sum of the removed stones divisible by 3. If a player removes a stone that results in a sum divisible by 3, they lose. The task is to determine whether Alice wins or Bob wins.