Code for different algorithmic challenges.