code from /r/dailyprogrammer challenges