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.
unpublished, as beeing too close of other kata and the tests still don't enforce the requirements, several years after the issues have been posted.
it's not, since in the linked kata there is always a loop
JavaScript translation kumited; please review and approve :)
I would agree that it is different. This one is easier and focuses on the core cycle detection algorithms without any additional requirements, such as in that kata. The goal of this kata is to detemine if there is a cycle, while that kata's goal is to detemine the length of the cycle.
Voile addressed this on GitHub a couple years ago:
/home/codewarrior/solution.txt
)I was worried about that. Is there a way to limit use of the standard library in a way accepted by the community? I feel like this problem is trivial if you are allowed to use a hash table or vector, but becomes much much harder and a more useful exercise when you have to use pointers. Thanks for the information though!
Thank you for the explanation. I will concede that your points are quite valid as even when I was writing up the solution for this I made a list of pointer variables and forgot to put an astrik in front of the later variables. I think it would be helpful to maybe define a styling to use in Kata's across the whole website though, so that in the future styling is more cut and dry.
I respectfully disagree. IMHO
Node* head
(placing the pointer marking right next to the type) is inherently misleading because it suggests that one can do something likeNode* a, b, c
to define three pointers toNode
but that is clearly not the case (well, perhaps except for C#, but who uses C# for low-level facilities?). But eh, as long as the compiler understands it :p TBH I've checked out the course contents in some of the intro C++ courses offered at my Uni and they useNode * head
(which IMHO is weird because it looks like you're doing a multiplication :p).Currently "using O(1) space" is not enforced, and wouldn't know how.
Actually they are a little bit different. The one you linked guarantees a loop exists and the goal is to find the length of the loop. The problem I have created asks you to determine if there is a loop or not. I am kind of new to the site though, is this not sufficiently different?
Unpublishing it I think.
You can unpublished the kata ;-)
I feel like it is clear. I read it like its another word in the type similar to "unsigned int" or something similar. Is there a styling guide anywhere on the website?
Loading more items...