We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Iterating the whole string and the sliced string is not necessary. Here's how I did it by dividing our string into two parts and iterating each part only once.
Repeated String
You are viewing a single comment's thread. Return to all comments →
Iterating the whole string and the sliced string is not necessary. Here's how I did it by dividing our string into two parts and iterating each part only once.
Hackerrank - Repeated String Solution