add algorithm exercise