String Rotation Easy

+50 PTS

Before you start the test, check out our tutorial challenge

  • TYPE CODE PRACTICE CHALLENGE
  • LANGUAGES JAVASCRIPT, PHP, PYTHON, PYTHON2 AND 3 MORE
    LANGUAGES JAVASCRIPT, PHP, PYTHON, PYTHON2, RUBY, SWIFT, TYPESCRIPT
  • TIME ~10MIN

String Rotation

Challenge outline

Hello and welcome to the challenge!


Write a code which checks if the given array arr includes all rotations of the given string str.

Example

ifContainsAllRots('abc',['abc','cab','bca','12']) -> true

ifContainsAllRots('123',['123','312']) -> false

Constraints

  • 0 < length of str < 100


You can solve this programming contest in Ruby, JavaScript, Python and many other languages. If you want, you can also take part in other November 2019 competitions. Below you can find some of them:



Have fun and good luck! :)