lsh codePrime Ministers while having huge responsibilities and roles to play are only human too, which also means that apart from running the country, they are just like us and have a myriad of hobbies. Recently we reported that Singapore’s Prime Minister Lee Hsien Loong had a hobby and that hobby was coding.

In fact he even coded his own Sudoku solver program using C++ which is pretty admirable and a commendable effort. That being said for those who are wondering how he did it, you might be pleased to learn that the Prime Minister has decided to be generous and share his code via his Facebook page which also linked to a public Google Drive folder.

According to the description of his code, “The program is pretty basic: it runs at the command prompt, in a DOS window. Type in the data line by line (e.g. 1-3-8—6), then the solver will print out the solution (or all the solutions if there are several), the number of steps the program took searching for the solution, plus some search statistics.”

Now for some of you guys, this is pretty basic and straightforward stuff, but for those who are looking to get into coding, hopefully the idea that a man busy running his country has found to code will give you some inspiration to start as well. In the meantime Prime Minister Lee Hsien Loong has also encouraged developers to help spot some bugs if there are any.

Filed in General. Read more about .

Discover more from Ubergizmo

Subscribe now to keep reading and get access to the full archive.

Continue reading