Code written for challenges on r/dailyprogrammer