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

Chinese fans trash blackout as Google AI wins again

May 25, 2017

Chinese netizens fumed Thursday over a government ban on live coverage of Google algorithm AlphaGo's battle with the world's top Go player, as the programme clinched their three-match series in the ancient board game.

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.