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.
It's back.
Database Schema picture is gone
Fixed.
Hey, @UniquePatel.
First of all, you replied to an individual comment in order to ask for help. You should try not to reply to a comment unless the subject matter of your comment is truly in reply to that comment.
Second, I'm not going to give you the answer, but I can tell you that any answer with
permutations(list(str(positive_integer)))
will time out. Pretty much no matter what you do after that. If you feed in a number with many digits, that will be a huge number of combination possibilities. You can't possibly iterate over all of them to see which is the minimum number that is bigger than the given integer.It seems you'll have to rethink your approach to this problem. Try and look at some of the example test cases or other examples done by hand and see if you can find a pattern. After all, this is a question of what algorithm gives the correct result.
This comment is hidden because it contains spoiler information about the solution
Oh. Thats explain everything, thanks.
Iterating up to N is not efficient enough. There's 100 tests with similar numbers that you tested, so that's why it times out.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution