6 kyu
Game Hit the target - 2nd part
208 of 449Ruscore
Description:
Hit the target
This is the second part of the kata :3 šššššgiven a matrix
n x n
(2-7), determine if the arrow is directed to the target (x). Now there are one of 4 types of arrows (
'^', '>', 'v', '<'
) and only one target (x
)An empty spot will be denoted by a space " ", the target with a cross "x", and the scope ">"
Examples:
given matrix 4x4:[
[' ', 'x', ' ', ' '],
[' ', ' ', ' ', ' '], --> return true
[' ', '^', ' ', ' '],
[' ', ' ', ' ', ' ']
]
given matrix 4x4:
[
[' ', ' ', ' ', ' '],
[' ', 'v', ' ', ' '], --> return false
[' ', ' ', ' ', 'x'],
[' ', ' ', ' ', ' ']
]
given matrix 4x4:
[
[' ', ' ', ' ', ' '],
['>', ' ', ' ', 'x'], --> return true
[' ', '', ' ', ' '],
[' ', ' ', ' ', ' ']
]
In this example, only a 4x4 matrix was used, the problem will have matrices of dimensions from 2 to 7
And here is the first part of this kata - click me āvā
Happy hacking as they say! š»
Matrix
Arrays
Strings
Fundamentals
Similar Kata:
Stats:
Created | Oct 26, 2021 |
Published | Oct 26, 2021 |
Warriors Trained | 802 |
Total Skips | 23 |
Total Code Submissions | 2272 |
Total Times Completed | 449 |
JavaScript Completions | 208 |
Python Completions | 221 |
Rust Completions | 33 |
Go Completions | 17 |
Total Stars | 20 |
% of votes with a positive feedback rating | 92% of 120 |
Total "Very Satisfied" Votes | 103 |
Total "Somewhat Satisfied" Votes | 15 |
Total "Not Satisfied" Votes | 2 |
Total Rank Assessments | 21 |
Average Assessed Rank | 6 kyu |
Highest Assessed Rank | 5 kyu |
Lowest Assessed Rank | 7 kyu |