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.
python new test frameworks
Hi! I noticed that in your answer you also converted the letter
z
tos
, although I see no reason for this. I think the mistake is in this.The original sequence:
jdtqzbq
Correct sequence after conversion:
jdtpzbq
And the sum of the letters:
0 + -2 + 0 + 3 + -1 + 2 + -3 => -1
, thereforeRight side wins
I hope I helped you figure it out.
It seems you've missed that part in the description:
And please use the spoiler flag next time you post code.
This comment is hidden because it contains spoiler information about the solution
python new test framework is required. updated in this fork
Thanks! I totally understand your reasoning and that's generally true that function's signature should be enough, but I am the case where full definition is useful as I'm writing that in IDE. I wrote that definition on my own which was working till some point, and this
map(|n| Box::new(n))
was missing.Thanks again, I really appreciate that!
Yes, the description is complete. You don't need to see the source (i.e. the body of the function) to understand what it does: it returns a
TreeNode
. All it does is abstract away theBox
for you. I could post the code here, but frankly I think you're better served understand and accepting why this isn't necessary. If you look at the official documentation for any type, you'll notice that only the signature of methods is given, because that's all you need to know to work with it.EDIT:
I've since realised that the reason one might want to see the full implementation is to use this locally in your IDE. My bad. I've updated the description to show the full implementation now.
Thanks for providing Rust translation.
Is that description complete?
Any chances to have it provided in full shape?
Hi, that' wholesome set of Katas, thanks!
I am getting some issue in Rust, with random tests.
Let's see
"jdtqzbq"
. After wololoing, that should bejdtpsbq
, right? Becaused
betweenj
andt
is not changed, and thenq
just aftert
is changed top
. So we have0 -2 0 3 1 2 -3
, which reduces to1
which says that Left won. But expected isRight side wins
.Am I doing something wrong on any step or something's wrong with calculating expected values?
I think this one is a little harder than 5th kyu, very nice one.
It looks short and cool, but it works very slowly, because of brute force and sort :(
python 2 only
Thank you for the information from the article you bring. I also found a website that also has a lot of useful information https://learnshareit.com/python-tutorial/ that everyone can refer.
This comment is hidden because it contains spoiler information about the solution
Nope, the
check_yield
is completely broken.You can use
inspect.isgeneratorfunction
.Loading more items...