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.
If you have execution timeout, then the solution does not pass, despite of returning correct answers.
See if this paragraph helps.
My solution passed tests, but Execution Timed Out (12000 ms). I used BigInt in the loop for big calculations. What should i do?
Totally forgot about this, never occured to me that i could use this.
In Java i find it imposible to do the large number part, because its bigger than the range of long
Haskell fork
$O(n^2)$
solutions fail.No, it's not about finding the largest permutation. It's about finding the next one which is larger than the current.
I thougthI understood the question , but the test don't seem to be clear , If we are supposed to rearange all the number and compare if the input is greater than all the possible permitation, please explain me this
12 ==> 21 = > Ok
513 ==> 531 => OK
2017 ==> 2071 => shouldn't 7210 ??
HATE RETURN
fantastic
The C# reference solution returns different results compared to other languages.
Liked it but I feel the description unnecesssarily verbose and confusing.
Changing the return type to long is insufficient, but required. (unless you're really lucky with tests?)
You must also cast the long to int, as some random tests expect the overflow value.
The c# solution is currently not solvable without this realization.
Possible Java translation
@natan ~ your comment says 10 minutes ago, mine says 11 minutes ago, but yours is posted above mine...
¯\_(ツ)_/¯
probably printing. try silencing the print statement.
Loading more items...