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”.