PM Lee unleashes his inner geek by sharing Sudoku source code

PM Lee Hsien Loong shares a computer programme he wrote several years ago on Facebook

PM lee source code

Who knew Prime Minister Lee Hsien Loong was such a geek at heart?

PM Lee shared the last computer programme he wrote on Facebook on Monday (May 4) after he was asked for it during the Founders Forum two weeks ago.

According to Mr Lee, the C++ Sudoku solver was written several years ago and he even shared the source code, the exe file and a sample printout. He added that the programme was “pretty basic” and explained how it worked 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,” he wrote.

PM Lee also posed a question for those interested in reading the source code - “If x is an (binary) integer, what does (x & -x) compute?” - and asked techies to tell him “if there are any bugs”.

Related:
7 things you didn't know about PM Lee

Report a problem