My attempt at solving the Quora programming challenges