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.
Yes that's right!
And now ?
I really loved this recursive solution, while not being the efficient one!
This comment is hidden because it contains spoiler information about the solution
I fixed the Issue!
Normally I fixed the Issue!
Normally I fixed the Issue!
Hahaha! That's what I added after getting your request :)
The elements are ordered and added sequentially, meaning
arr[1]
is generated fromarr[0]
,arr[2]
is generated fromarr[1]
and so on.How many test could you suggest, please ?
Having a string of six characaters there are cases where there are at most six different permutations it could be lesser.
Exemples :
"ABCDEF" ==> "ABCDEF","FAEBDC","CFDABE","ECBFAD","DEBFAD","DEACFB" and "BDFECA"
"BBBBBB" ==> "BBBBBB"
"MAAMAAA" ==> "MAAMAAA","AMAAAAM" (only two permutations)
Yes Java and Python are more mature. Actually Java is the most efficient of the three of them.
Can you suggest another formulation, please ?
What
sc
? I removed it.That's a typo, dear friend, there are four examples below the description to explain exactly the outcome of the function.
Yes you're right on some extent. But, you compute the indexes once but on the other hand you need more storage :)
An array for the indexes, for a huge string you will need a huge array
I just use a two simple vars that compute the next position each time :)
Loading more items...