Alternative (simpler?) solution to checking the X pattern in part 2: extract the diagonals into a 2x3 matrix, laminate it with its reverse, then check if exactly 2 rows are equal to 'MAS'.
Super cool 😁 fun to see how differently this can be approached. I was also inspired by dzaima's solution, I have a video of mine on my channel if that's interesting
Just wrote this up, hope it helps: mlochbaum.github.io/BQN/try.html#code=TG9nIOKGkCB74oCiU2hvdyDwnZWo4oC/8J2VqX0KCiJtIiBMb2cgbSDihpAgM+KAvzPipYrihpU5CkQg4oaQICgr4oycwrTihpXCqOKImOKJoiniirjiipQKCiMgU3RlcCBieSBTdGVwCiJyYW5nZSBvZiBlYWNoIGRpbWVuc3Rpb24iIExvZyDihpXCqOKJoiBtCiJvdXRlciBwcm9kIHN1bSIgTG9nICgr4oycwrTihpXCqOKImOKJoiltCiJncm91cCIg4oC/ICgoK+KMnMK04oaVwqjiiJjiiaIp4oq44oqUIG0p
Alternative (simpler?) solution to checking the X pattern in part 2: extract the diagonals into a 2x3 matrix, laminate it with its reverse, then check if exactly 2 rows are equal to 'MAS'.
Super cool 😁 fun to see how differently this can be approached. I was also inspired by dzaima's solution, I have a video of mine on my channel if that's interesting
Where can I find more about that diagonals function, while not bqn I tried solving it declaratively but the diagonals broke me.
Just wrote this up, hope it helps: mlochbaum.github.io/BQN/try.html#code=TG9nIOKGkCB74oCiU2hvdyDwnZWo4oC/8J2VqX0KCiJtIiBMb2cgbSDihpAgM+KAvzPipYrihpU5CkQg4oaQICgr4oycwrTihpXCqOKImOKJoiniirjiipQKCiMgU3RlcCBieSBTdGVwCiJyYW5nZSBvZiBlYWNoIGRpbWVuc3Rpb24iIExvZyDihpXCqOKJoiBtCiJvdXRlciBwcm9kIHN1bSIgTG9nICgr4oycwrTihpXCqOKImOKJoiltCiJncm91cCIg4oC/ICgoK+KMnMK04oaVwqjiiJjiiaIp4oq44oqUIG0p