algorithm,solution