Company: StoneX_22july
Difficulty: medium
Prime Jumps 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 value is added to the score. The game concludes when the player lands on the final cell, n-1. Determine the maximum possible score. Examples Example 1: Input: cell = [0, -10, -20, -30, 60] Output: 40 Explanation: There are n = 5 cells in the array, with cells numbered from 0 to 4. The player starts at cell 0 and can reach cells 1 and 3. The player can always move 1 cell right until reaching cell n-1. 3 is a prime number with the least significant digit of 3. There are three ways to reach cell 4: Jump 3 then 1, sum[-30, 60