Index.

All Rotations of a String

All Rotations of a String

https://edabit.com/challenge/XoBFQ9CJDBFEKEAj9

Crear dos funciones (leftRotations y rightRotations) que retornan todas las rotaciones de izquierda y derecha de un string.

Ejemplos

leftRotations("abc") ➞ ["abc", "bca", "cab"]

rightRotations("abc") ➞ ["abc", "cab", "bca"]

leftRotations("abcdef") ➞ ["abcdef", "bcdefa", "cdefab", "defabc", "efabcd", "fabcde"]

rightRotations("abcdef") ➞ ["abcdef", "fabcde", "efabcd", "defabc", "cdefab", "bcdefa"]