Singapore PM praised after sharing Sudoku-solver code

May 6, 2015

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

Describing the programme 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 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.

Explore further: Singapore PM finally taps into Facebook, Twitter

Related Stories

Singapore PM finally taps into Facebook, Twitter

April 20, 2012

Singapore Prime Minister Lee Hsien Loong joined Facebook and Twitter on Friday to better connect with citizens who have increasingly vented their frustrations with his government on social media.

Singapore vows to hunt down Anonymous hackers

November 6, 2013

Singapore will "spare no effort" to hunt down hackers from activist group Anonymous who last week threatened to wage a cyber war against the government, Prime Minister Lee Hsien Loong said Wednesday.

Video: Gates, Zuckerberg urge kids to code (Update)

February 26, 2013

Microsoft Chairman Bill Gates, Facebook CEO Mark Zuckerberg and Twitter creator Jack Dorsey are among the tech luminaries appearing in a new video promoting the teaching and learning of computer coding in schools.

Facebook releases Hack programming language for HHVM

March 23, 2014

(Phys.org) —Facebook this week unveiled Hack, a programming language they had in use for a year but have now released as per an official announcement posted on the engineering blog on Thursday. What's in it for programmers?

Recommended for you

Volvo to supply Uber with self-driving cars (Update)

November 20, 2017

Swedish carmaker Volvo Cars said Monday it has signed an agreement to supply "tens of thousands" of self-driving cars to Uber, as the ride-sharing company battles a number of different controversies.

New method analyzes corn kernel characteristics

November 17, 2017

An ear of corn averages about 800 kernels. A traditional field method to estimate the number of kernels on the ear is to manually count the number of rows and multiply by the number of kernels in one length of the ear. With ...

0 comments

Please sign in to add a comment. Registration is free, and takes less than a minute. Read more

Click here to reset your password.
Sign in to get notified via email when new comments are made.