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.
nice entry point to binary trees
Python Translation
How come this is tagged 'binary search tree' when the tree is not a binary search tree (can be unsorted)?
COBOL translation (author is inactive).
I Had the same issue, how did you fix it?
It actually is relevant, because there are different rules when you play with more than one deck. Many solutions probably won't be affected, but I am sure there are certain solutions that rely on the fact that there are no duplicate cards to simplify certain steps.
Had a trouble too. Turns out I haven't assumed at the beginning that the default dierction is to the right.
Solution is neat but does not recognize the modulo as an operator
That means this is the only test your code doesn't handle properly. With already more than one thausend completions, it would be known if there was an error in this test. I just checked that the java version of this test use the right input code and it's exactly the same than in python (355 completions), so the test is good as well as the expected value. Please review your code.
hi,
sieve test case in java outputs 2 but expected 23571113171923293137.
I've debugged it carefully and that is the only test which is not passing.
Having troubles with the factorial test case in Java, anyone managed to pass it?
in any case in a single node of -5 it should return -5.
I agree I will change the case that the root is always not null, thanks again.
I agree I will change the case that the root is always not null, thanks again.
Also, returning
0
makes no sense at all when node values can be as low asMIN_VALUE
. The usual convention formax/min
in absense of any values areMIN_VALUE/MAX_VALUE
respectively. Returning0
will break invariants of themax/min
function, e.g a single Node of-5
will return amax
of0
when it should really be-5
.Loading more items...