• Welcome to Tamil Brahmins forums.

    You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our Free Brahmin Community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

    If you have any problems with the registration process or your account login, please contact contact us.

Prime Minister of Singapore shares his C++ code for Sudoku solver

Status
Not open for further replies.
Wow! Technology at the highest level! And willing to learn at this age! Compliment the PM of Singapore!

[h=1]Prime Minister of Singapore shares his C++ code for Sudoku solver[/h] [h=2]Posts source to his Facebook page, asks for bug reports.[/h] by Sean Gallagher - May 5, 2015


code-640x1097.jpg
A screenshot of Prime Minister Lee's carefully commented code.
Lee Hsien Loong
There are few national leaders who can say that they really understand technology. Even fewer of them have written actual programming code. But Singapore's Prime Minister Lee Hsien Loong has outdone them all by posting the source code for a program he wrote to Facebook today. The PM asked for bug reports to boot.

Lee mentioned the program in a speech he gave at a reception on April 20 before IT industry leaders. "The last program I wrote was a Sudoku solver in C++ several years ago, so I’m out of date," he said. "My children are in IT, two of them—both graduated from MIT. One of them browsed a book and said, 'Here, read this.'" It was a textbook on the Haskell programming language, Lee recounted. "One day that will be my retirement reading."


After the speech, Lee received a number of requests to see the code for his program. So today he posted a screenshot of the code along with a link to a Google Drive folder containing the source code, a sample of its output, and a compiled Windows (well, DOS command line) executable to his public Facebook page. "The program is pretty basic: it runs at the command prompt, in a DOS window," he wrote. "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 concluded. "Please tell me if you find any bugs!"

Prime Minister of Singapore shares his C++ code for Sudoku solver | Ars Technica
 
Status
Not open for further replies.

Latest ads

Back
Top