Here is code for reddit's /r/dailyprogrammer solutions