algorithm problems and math problems