Coded solutions to various interview puzzels