[programmingPearls][chapter02][cycleshift] add reverse algorithm