Skip to content

Latest commit

 

History

History
29 lines (21 loc) · 685 Bytes

README.md

File metadata and controls

29 lines (21 loc) · 685 Bytes
difficulty OAs projects
newbie
Manipulación de strings
Métodos de arrays
data-lovers
memory-match

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"]