A ordem lexicográfica graduada (ordem grlex, para abreviar) é uma forma de ordenar palavras que:
Por exemplo, na ordem grlex:
Dado um array de palavras, retorne esse array na ordem grlex.
makeGrlex(["small", "big"]) ➞ ["big", "small"]
makeGrlex(["cat", "ran", "for", "the", "rat"]) ➞ ["cat", "for", "ran", "rat", "the"]
makeGrlex(["this", "is", "a", "small", "test"]) ➞ ["a", "is", "test", "this", "small"]N/A