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

A novel approach of improving battery performance

September 18, 2018

New technological developments by UNIST researchers promise to significantly boost the performance of lithium metal batteries in promising research for the next-generation of rechargeable batteries. The study also validates ...

Germany rolls out world's first hydrogen train

September 17, 2018

Germany on Monday rolled out the world's first hydrogen-powered train, signalling the start of a push to challenge the might of polluting diesel trains with costlier but more eco-friendly technology.

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.