Implemented rotation and improved rotate and reverse function's efficiency through adjustments in place rather than into new lists.