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.
OP solved it, closing
My solution works but I'm not sure if it's correct to use 'sys.setrecursionlimit()' in Python.
I'm sure the level should be 4, but yes, there is a mistake in the string.
I'm sure that u are creating a new node with Node(pos), a node with default values like passable = True, to access to a node in the grid just pos.position or pos.passable.
The frequency of a character matters, if you have in the first string "aa" and the second string is "aaa" the programm should return FALSE. But if the first string is "bbb" and the second string is "bb" the programm should return TRUE.
Again, your code goes through all elements of a, what if
a
has a million elements andb
another million? Think how you can possibly do less operations without going through all elements of each string.Please take care not to post solutions in the discourse without the spoiler tag.
This comment is hidden because it contains spoiler information about the solution
Change the algorithm, right now, it does a lot of unnecessary calculations.
This comment is hidden because it contains spoiler information about the solution