7 kyu
Cat and Mouse - Easy Version
3,642 of 10,147PG1
Description:
You will be given a string featuring a cat 'C'
and a mouse 'm'
. The rest of the string will be made up of '.'
. The string will start with the cat, and end with the mouse.
You need to find out if the cat can catch the mouse from its current position. The cat can jump over at most three characters. So:
"C.....m"
returns "Escaped!"
<-- more than three characters between
"C...m"
returns "Caught!"
<-- as there are three characters between the two, the cat can jump.
Fundamentals
Strings
Similar Kata:
Stats:
Created | Sep 30, 2016 |
Published | Sep 30, 2016 |
Warriors Trained | 12732 |
Total Skips | 394 |
Total Code Submissions | 27078 |
Total Times Completed | 10147 |
JavaScript Completions | 3642 |
Ruby Completions | 394 |
Python Completions | 3280 |
PHP Completions | 620 |
Haskell Completions | 119 |
C# Completions | 551 |
Kotlin Completions | 797 |
Crystal Completions | 10 |
CoffeeScript Completions | 11 |
Julia Completions | 24 |
C++ Completions | 709 |
TypeScript Completions | 200 |
Java Completions | 168 |
Total Stars | 74 |
% of votes with a positive feedback rating | 88% of 1444 |
Total "Very Satisfied" Votes | 1154 |
Total "Somewhat Satisfied" Votes | 237 |
Total "Not Satisfied" Votes | 53 |
Total Rank Assessments | 28 |
Average Assessed Rank | 7 kyu |
Highest Assessed Rank | 7 kyu |
Lowest Assessed Rank | 8 kyu |