wes d2a2ba9e15 first commit | 4 年 前 | |
---|---|---|
.. | ||
README.md | 4 年 前 | |
code.cpp | 4 年 前 | |
unitTest.cpp | 4 年 前 |
by Helen Yu tags: sorting, formatting
Create a function that returns true if an asterisk * is inside a box. Examples inBox([ "###", "##", "###" ]) ➞ true inBox([ "####", "# #", "# #", "####" ]) ➞ true inBox([ "####", "# #", "# #", "####" ]) ➞ false inBox([ "#####", "# #", "# #", "# #", "#####" ]) ➞ false Notes The asterisk may be in the array, howev
Create a function that returns true
if an asterisk *
is inside a box.
inBox([
"###",
"#*#",
"###"
]) ➞ true
inBox([
"####",
"#* #",
"# #",
"####"
]) ➞ true
inBox([
"*####",
"# #",
"# #*",
"####"
]) ➞ false
inBox([
"#####",
"# #",
"# #",
"# #",
"#####"
]) ➞ false
The asterisk may be in the array, however, it must be inside the box, if it exists.