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 is amazing how one can forget how to use your tools properly. Amazing solution. Thanks!
How can hardcoding answers be best practice?
:)
Thanks for pointing out that I failed to check the boundary condition. I have added a new fork with that corrected. Please check!
And, in this case n ** 0.5 is square root of the number n.
Yes, you are right. I was just overthinking. In fact, I am shamelessly using this method in other katas now. Thanks!
This comment is hidden because it contains spoiler information about the solution
This is the correct answer to the problem. Rather, problem is likely designed with this solution in mind.
How can hardcoding answers be best practice?
Will this solution not increase the maximal recursion depth to obtain the solution?
This comment is hidden because it contains spoiler information about the solution
Repeatedly getting error Error: Command failed: javac -verbose -cp followed by a long list of description. Any idea why I am getting this?
Apart from the issues generated by others in python, I noticed one very peculiar thing. In the output for me, the first test for pass1 for case when you have, say 2 * 3 * a, and if you return {'a': {'n': 2, 'op': 'imm'}, 'b': {'a': {'n': 3, 'op': 'imm'}, 'b': {'n': 0, 'op': 'arg'}, 'op': ''}, 'op': ''} instead of {'a': {'a': {'a': {'n': 2, 'op': 'imm'}, 'b': {'n': 3, 'op': 'imm'}, 'op': ''}, 'b': {'n': 0, 'op': 'arg'}, 'op': ''}, then the test is failed, although both of them should be correct asts. I understand that one is better than other, but still they will both solve the purpose.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
I saw this solution to a 3 kyu problem:
solution = MySolution()
def listPosition(word):
"""Return the anagram list position of the word"""
result = solution.listPosition(word)
solution.counter = 0
return result
Is this not cheating?
Loading more items...