A Routing Algorithm and Generalization for Cube-Connected Cycle Networks