Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Though you have solved it, but I would like to suggest you consider
console.log
as your best friend and watch out for edge cases by re-reading the description several times. Kudos ^^In JavaScript console.log(array) can be used for this purpose. I don't know about other languages
try putting the rooks on a (possibly virtual) chessboard for a small
n
(2, 3 or 4) and see how you would count the positions if you were to do it manually. you should be able to notice how the position of one rook determines that of the rook on the next rank or file