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.
Test coverage was fine, random tests were just broken. I made them actually run and now that solution is failed.
can some more information and/or hints be given on what is the center of mass/how to approach calculating this? (my rudimentary understanding of physics suggests that center of mass is calculated (x1m1+x2m2...)/(m1+m2....). My current thinking is that perhaps I can use this to calculate a center of mass in the x and y plane and then if these two numbers are correct, then determine the answer?
well, you solved the kata :)
The center of mass of these tubes is exactly in the center of the centrifuge. This kata asks you to figure out the center of mass, so I can't give you an exact algorithm how to get there.
Yes, I agree with you. And your solution is very accurate
To clarify this old question, there is nothing that states that top level parenthesis groups must be in their own branch. One possible example tree for
()()()
might start with a left branch of()()
and a right branch of()
. How exactly you decide to encode it is up to you, and is the point of the kata.they're both from the same author as well, very peculiar... this one is from 2015, the "partial application" one from 2014
O(n^3)
solutions should be easier to pass the tests now.Anyone can read your message from the dashboard. Please use the spoiler flag.
This comment is hidden because it contains spoiler information about the solution
Your enconding should transform the input string "()()()" to a binary tree and that will solve the problem. It is an assumption bias that "()()" encodes something that has 2 branches, so "()()()" should encode something with 3 branches.
Yes.
Also you're delving into the wrong direction.
Not in this way.
There is a couple of more URLs possible, yes.
I think the possible short URLs are actually more
It's
One, Two, Three OR four lower case characters.
So no 26^4
But
26+26^2+26^3+26^4 = 475 254
Loading more items...