This page describes a Groovy solution for ShortestSudokuSolver.
The solution (210 characters plus 2 newlines):
Add the following line to the script to solve a partially complete puzzle (should take just a few seconds):
Alternatively, add the following line to the script to solve a puzzle from scratch (may take 30-60 minutes or more):
Here is the more usual representation of the puzzle:
A slightly longer version (213 characters plus 2 newlines):
The expected output is:
To make the function stop as soon as it finds the first solution (proper puzzles will only have one solution), the else becomes: