This week we had a little assignment where we receive a text as input. But all letters in the text are rotated by some number. Our mission is to find out what the original text was.
Below follows a naive approach by just applying brute force and shifting all letters for a range of 1 to 25.
TextRotator trait:
The test script:
Output of running the NLPTest:
The solution can be found on lines 16.
"abcdefghijklmnopqrstuvwxyz".split("").toList.zipWithIndex
ReplyDelete:-)
This comment has been removed by the author.
ReplyDeleteThis comment has been removed by the author.
ReplyDelete