Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
It would put "a2" since it ignores the usual "" divider that is created at the beginning of the string that now also includes a 1. So divider[0] = "1" when it usually is divder[0]=""
I know this argument went on two years ago but both of these "top 2" solutions use expensive string operations such as .replace(), .lastIndexOf(), and .indexOf() making them O(n^2). If you use an array to store the number of occurances for the 256 ASCII characters and then loop through the string again checking the array for occurances less than 1, you can get a solution that takes O(2n) = O(n).