Max Coins Collected by Jumping Over Tokens

Asked at Google · Coding Questions · Difficulty: Hard · Last asked May 7, 2026

You are given an array `arr` of length `n` where `arr[i]` is the number of coins at cell `i` (values may be negative, representing penalties). From index `i` you may jump forward to `i+1`, `i+2`, or `i+3`. You may start at any index and stop at any index, collecting the coins on every cell you visit (including the start).

Loading the problem…