An attempt to solve 2 of the Quora challenges.