This article is more than 1 year old

Singapore's prime minister releases source code for his hand-coded Sudoku-solver

Top that, David Cameron and Ed Miliband

Singaporean prime minister Lee Hsien Loong has decided to reveal the source code of the Sudoku-solving app he personally coded.

The PM revealed he likes to program in his spare time last month and mentioned the Sudoku-solver. He's since taken to Facebook to announce the source code dump.

“The program is pretty basic,' the PM writes, “it runs at the command prompt, in a DOS window. Type in the data line by line (e.g. 1-3-8---6), then the solver will print out the solution (or all the solutions if there are several), the number of steps the program took searching for the solution, plus some search statistics.”

“Hope you have fun playing with this,” he adds. “Please tell me if you find any bugs!”

With the United Kingdom going to the polls this week, plenty of Reg readers will doubtless wish that the main candidates for prime minister – David Cameron and Ed Miliband – could code a single line of anything, never mind engage with the nation's technology community. Or maybe you'd prefer they, and Hsien Loong, stick to their knitting? ®

Bootnote: The image at the top of the story is real. Snakes on a Sudoku the “Official Snakes on a Plane Puzzle Book”, can be yours from just one US cent.

More about

More about

More about

TIP US OFF

Send us news


Other stories you might like