Added working problem 2, and untested, inefficient brute solution of problem 3