Cat's paw - 01 - MATLAB Cody - MATLAB Central

Problem 45347. Cat's paw - 01

Difficulty:Rate

lets imagine a cat, standing on an infinitely long row of tiles. since its a 'cat', string length=3; it takes 3 tiles to stand.

Imagine the row of tiles marked as a continuous set of a-z. so the cat is standing in tiles marked as 'abc'.

Now, whenever the cat makes a call, it jumps the distance equal to the length of the call. e.g. if the call is 'meaw', length=4; it'll jump 4 tiles; placing itself in tiles 'hij'.

the output should contain the tiles before & after cat's current position. i.e. 'gk'.

n.b. initially the cat is in 'abc' >> so the output should contain only 'd' -- since there are no tiles before the 1st tile.

Solution Stats

25.0% Correct | 75.0% Incorrect
Last Solution submitted on Jul 12, 2025

Problem Comments

Solution Comments

Show comments
MATLAB EXPO 2025 Registration is Now Open! November 12 – 13, 2025
Registration is now open for MathWorks annual virtual event MATLAB EXPO 2025...
0
0

Problem Recent Solvers11

Suggested Problems

More from this Author174

Problem Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!