refine ArrayAlgorithm with more python codestyle