The solutions to some algorithm problems