• + 1 comment

    It's just straight-forward backtracking (brute forcing).

    Try to every board/word combination. Avoid bad word placements (bad overlap, not taking up an entire row/column, etc). Keep track of what you've placed so you don't place the same words twice.

    You can code it mentally in a minute. It takes a while to type though.

    How good are you at recursion? I recommend codingbat.com for very easy to medium recursion problems.

    My Lengthy Java Solution https://www.hackerrank.com/challenges/crossword-puzzle/submissions/code/52906089

    I haven't tried to make the code better, but I think it's neat enough to where you can read it.