Google Interview Question

Sort words with the same root based on their Caesar cypher rotation value.