Singapore PM praised after sharing Sudoku-solver code

Agence France-Presse

This is AI generated summarization, which may have errors. For context, always refer to the full article.

Singapore PM praised after sharing Sudoku-solver code

WALLACE WOON

Describing the program as "pretty basic", Lee also posts a link which contained the full printout of the code and invited readers to tell him if there were bugs

SINGAPORE – Singapore’s Prime Minister Lee Hsien Loong has revealed his computer programming skills after sharing on Facebook a Sudoku puzzle-solver code he wrote.

Lee, 63, a first-class mathematics graduate from the University of Cambridge in Britain, posted a screenshot of the code written in the C++ programming language.

Describing the program as “pretty basic”, Lee also posted a link which contained the full printout of the code and invited readers to tell him if there were bugs.

Lee first revealed his talent for coding in a speech at a technology convention last month.

“I used to enjoy this; it is a long time since I’ve done anything,” he said at the event, referring to the Sudoku code written a few years ago. 

The Facebook post on the code has been shared nearly 15,000 times and had more than 42,000 likes by Wednesday afternoon, along with many comments praising Lee. 

“Wonder which other PM in the world does this?” said one Facebook user, Judith Oliver. 

Miles Berry, a computing lecturer in Britain, tweeted that he would like “coding challenges for our leaders before we vote on Thursday”, referring to the nation’s upcoming election.

But a group called HackerFantastic posted a Twitter message to Lee saying there was a “vulnerability” to his code as it has a “fixed sized buffer on stack” and used “scanf”.

Lee took the feedback in his stride, saying he would “add input validation” in a subsequent version.

 

I told the Founders Forum two weeks ago that the last computer program I wrote was a Sudoku solver, written in C++…

Posted by Lee Hsien Loong on Monday, May 4, 2015
 

Rappler.com

Add a comment

Sort by

There are no comments yet. Add your comment to start the conversation.

Summarize this article with AI

How does this make you feel?

Loading
Download the Rappler App!