Difficulty: MEDIUMCategory: InterviewExperienceFrequency: 1Asked On 2025-10-13Added By Anonymous
Source: Link
Company: Google
Role: unknown
Interview Stage: Phone Screen
Location: unknown
Year: unknown
Original Post Content:
The board is a linear arrangement of N positions represented by a string S consisting of '.', 'T' (token), or 'C' (coin). In a single move, any token can be shifted exactly three positions rightward, provided the destination does not already contain a token. Landing on a coin collects it (each coin collectible only once). Determine the maximum collectible coins.
e.g. T..C -> 1, T..C..C -> 2