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.
This comment is hidden because it contains spoiler information about the solution
Brilliant solution to solve the rock-paper-scissors winner mathematically by their unicode char values.
The texts are not changed. The discussion is over for me at this point. If you want, you are welcome to use these vault katas as a base for your own katas. Have a nice day. (@dfhwze: Thank you very much for your comment.)
Kees, now you are the one using stereotypes, which is exactly the thing you are blaming the other of doing ;-) Anyway, there are different cultures, each with their own values. Who are we to push our values onto others ... This is exactly why I find the original comment by dlcoe misplaced. It's virtue signaling and does not add anything useful to a programming challenge.
Three years later, this topic is so hot that even I noticed the bias here. I can't say for sure, but looking at the description this might be uploaded by an Eastern European alpha male. They have indeed a bit old fashioned ideas about gender (identity), relationships (male/ female, that's it), sexual preference and pronouns, preferred or not.
Give it another few centuries and they'll turn around. ;-)
great example, took me a whole morning trying to figure out how to 'backtrack' the 'index' of a current regex search
I want to be annoyed by this answer, but using only one collection for the test verification is just so lazy.
I don't remember other kata on codewars where you can have a method return a single integer and pass all tests.
I do hope comment art doesn't become "a thing" in general on this site.
How does a beginner go about understanding this regex? I can follow the parenthesis and understand the asterisks, but it's difficult to grasp the logic behind searching for the given sets of 0s and 1s. I can't even understand how to normally solve this kata without a regex, so I feel bad for getting stuck on this 4 kyu when I've completed others at this difficulty level.
Changing the specs on a kata with almost 22k solves isn't going to happen. For what it's worth I agree with you, but it's too late to change them now.
The description layout is also perfectly fine in the way it presents the problem in my opinion.
this is the stupidest suggestion for this kata yet....
You missed an opportunity to rant on "Mankind" there.
😒
Sure, Enumerable.Range is the reasonable choice, but then you are losing at code golf by 7 characters.
Instantiating an array and using the index from a select override only takes twice as long to run through the test cases.
It's easier to win at code golf when nobody else knows they are playing.
This comment is hidden because it contains spoiler information about the solution
I like how you used the index i of the for loop as a time unit to determine the state of the traffic lights.
With this solution you are always able to tell the current state for each given point of time instead of cycling through the states one by one.
Would have wished for some more descriptive variables and some code extraction into little functions, but you already mentioned that.
Great solution, learned something new.
Loading more items...