Introduction algorithm solutions