codes for programming challenges