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 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 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.
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 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.
"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.
Advertisement
"Wonder which other PM in the world does this?" said one Facebook user, Judith Oliver.
Advertisement
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".
Advertisement
COMMENTS
Advertisement
Singapore's Lawrence Wong Sworn In As New Premier In 2 Decades Meet Lawrence Wong, Singapore's Next Prime Minister Singapore Prime Minister Lee Hsien Loong To Step Down On May 15 Windows Computers Lead To 'Blue Screen Of Death' Due To CrowdStrike Error Massive Worldwide Microsoft Outage: Flights, Markets, Stock Exchange Down Microsoft 'Blue Screen Of Death' Outage: Full List Of Services Hit In India PM Modi Hails Lockheed Martin's Make In India, Make For World Drive Study Abroad: Top 10 Management Universities In United Kingdom "Reason Identified, Updates Released": India On Massive Microsoft Outage Track Latest News Live on NDTV.com and get news updates from India and around the world.