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.
The Node class is already defined and preloaded for you. You shouldn't need to define it yourself. Just use it as explained in the last part of the description.
Fixed it. Thanks!
I just mean having a test for a sufficiently large number, like 99999999999999 (not necessarily that one) so that a trivial solution like checking every number between 1 and that number would fail due to a timeout.
That would make the kata more interesting because people would need to fund a more efficient way to check for primality.
Would be nice if some of the test cases provided an input large enough so that a straightforward implementation would timeout. Just to make the kata a little bit more interesting.
The initial code to implement reads "function Bus {...". Are the missing "()" intentional or just missing?
I missed a line on the test cases. Now only some solutions are invalid, which are probably missing some edge case
I have updated the test cases to add some radomness but that seemed to have invalidated all previous solutions (except mine :P).
I'm checking to see if there's something wrong with the tests or with the solutions.
The test cases are pretty deterministic so if your solution doesn't pass there's probably some case you're not considering.
haha yeah... I would change the assertEquals to expect to avoid that but then that would be bad for people actually trying to get feedback when really trying to solve this...
+1 for thinking outside the box though :)
When I try to create a new Kata, after filling up all the required fields and clicking on either Publish or Save nothing happens and I get a "Uncaught TypeError: Object # has no method 'exitFullScreen' " on Chrome console.
Anyone else experiencing something similar?
Hi wthit56,
what you are describing would be a double linked list, where each node keeps track of the previous and next node on the list.
In a binary tree, each node has a reference to its left and right child but these child do not have a direct reference to their parent. So if 'a.getLeft()' gets you node 'b' then 'b.getRight()' will not get you 'a' back. It will get you whatever b's right child is or undefined if it has none.
I'll try to update the description to clarify this. Thanks!