Advertisement

New | Singapore’s PM Lee reveals a hidden talent: computer coding a Sudoku game

Reading Time:2 minutes
Why you can trust SCMP
0
Singapore Prime Minister Lee Hsien Loong is one of the top users of social media among world leaders. Photo: AFP

Singapore’s Prime Minister Lee Hsien Loong has a skill unlike those of many global leaders – writing computer software.

Lee, 63, son of the late Lee Kuan Yew, Singapore’s first prime minister, wrote in a post on his official Facebook account that some years ago he had written a program for the popular number puzzle game Sudoku, using the C++ computer language.

Lee, who is widely considered one of the most active politicians on social networks including Facebook and Twitter, published the original source code for the game in the post and explained the logic behind the program. He also answered questions raised by his followers.

“The program is pretty basic: it runs at the command prompt, in a DOS window … (it gives) the number of steps the program took searching for the solution, plus some search statistics,” Lee’s posting read. DOS refers to disk operating system, an old operating system that was mainly developed by US software firm Microsoft.

“Hope you have fun playing with this. Please tell me if you find any bugs! – LHL,” said Lee, who signs off personally written posts with his initials.

Lee, who has a degree from Britain’s Cambridge University in mathematics and a diploma in computer science, first posted the message on Monday. It had received more than 42,000 “likes” and nearly 15,000 shares on Facebook by Wednesday noon.

Advertisement