Usually I'd suggest to write the return in the same line after the if instead to better indicate it's an if body that is valid for one line only. Never forget that goto fail bug ;-)
I highly recommend using curly brackets { } for the if block for better readability, so the code reviewer won't be confused, like for example "why there are two returs?" for this sample code.
'-'
the same thing)
You don't need that const and those brackets
Facepalm. I still love you my pretty 6 lines of code.
This comment is hidden because it contains spoiler information about the solution
The 'return' gives you TRUE or FALSE after the condition is fullfield or not.
It couldve been that simple? im dead hahahahahah
Usually I'd suggest to write the
return
in the same line after theif
instead to better indicate it's anif
body that is valid for one line only. Never forget thatgoto fail
bug ;-)I highly recommend using curly brackets
{ }
for theif
block for better readability, so the code reviewer won't be confused, like for example "why there are two returs?" for this sample code..
;-)
This comment is hidden because it contains spoiler information about the solution
all the defined test cases fail, but all my random test cases pass...
It does yes. The above solution would return false in that case, as it isn't safe.
This comment is hidden because it contains spoiler information about the solution
Loading more items...