Some algorithm codes.