solutions to programming problems