*board checks rows.
*board.transpose checks columns
then you have a little loop to check 3x3 squares
unpack all of those and pass them to #all? and make sure they are all equaled to 1..9 sorted.
Almost the same as my solution! You would get the same results if you included only 1 hash per opposite directions rather than both. ie) [{k, v}] rather than [{k,v}, {v, k}]
HAHAHAHAHA that was hilarious!! You completely screwed the system!! Way to think outside the box!
really smart!
this looks very much like C code.
amazing solution!!!!!
*board checks rows.
*board.transpose checks columns
then you have a little loop to check 3x3 squares
unpack all of those and pass them to #all? and make sure they are all equaled to 1..9 sorted.
flawless...
unbelievably amazing solution.
damn! I was certain there were no easy way to solve this one! I ended up with bloated code! (I didn't know about the #each_cons method)
this is definitely the way to go.
rubocop would issue a
perceived cyclomatic complexity is too high
warningAlmost the same as my solution! You would get the same results if you included only 1 hash per opposite directions rather than both. ie) [{k, v}] rather than [{k,v}, {v, k}]