Company: uber_29oct
Difficulty: medium
Max Game Score Problem Description A game is played with the following rules: A player starts at cell 0 with a score of 0. There is a row of n cells numbered from 0 to n-1 . Each cell has an assigned value, and cell 0 always has a value of 0. In each move, the player can either: Move one cell to the right, or Move p cells to the right, where p is a prime number ending in 3 (such as 3 or 13). The player cannot move beyond the last cell. When the player lands on a cell, its cell value is added to the score. The game concludes when the player lands on the final cell, n-1 . Determine the maximum possible score. Function Description Complete the function maxGameScore in the editor with the following parameter(s): int cell_count : the number of cells ( n ) int* cell : the cell values Returns int : the maximum possible score Examples Example 1: Input: n = 4 cell = [0, -10, 100, -20] Output: 70 Explanation: Possible scores are: Jump 3 (from 0 to 3): Score = cell[0] + cell[3] = 0 + (-20) = -20.