← Questions

Collect coins with tokens that move three steps right

0
GoogleCodingLast asked Dec 2025

A one-row board is a string of . (empty), T (a token) and C (a coin). A move takes any token exactly three cells to the right, onto a cell no token occupies; landing on a coin collects it (passing over one does not), and each coin is collected once. Tokens may move any number of times. Return the most coins the player can collect.

Write and test your solution herePython in your browser, the question's tests level by level, every submission kept for you.Sign in to start coding