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.
fixed, thanks!
lol idk man I was 16,
abs
should work hereNo one is working together on some ultimate programming project in this thread. This is Codewars. Just have fun and do stupid shit. Nobody said this code was an improvement; it's just another submission.
Of course I need it, just search how it is used in floodfill and think of what happens if this check is skipped.
Not to mention that it can't handle consecutive dashes or underscores.
"big__gap" becomes "big_gap" instead of "bigGap"
I'm surprised the official tests didn't include these cases.
ranks cannot be changed
Fixed.
no answer from OP and no evidence given
please read the description...
Friendship is commutative. (The description doesn't explicitly say this, but I think it's clear from the example given, which has
Harry/Ron
but notRon/Harry
.)Can you post the test case (the first few lines of it, at least) that produced the strange behaviour?
yes, you're right.
after seeing your code, it looks like a duplicate of this issue (initial code has incorrect output type
std::unordered_map<std::string, std::string[6]>
instead ofstd::unordered_map<std::string, std::vector<std::string>>
)no answer from OP
added better assertion messages to C++
your suggestion is not good either, since the user solution is only supposed to shuffle the array elements, instead of re-assigning them. it's not the contents of the strings that matter, but their addresses - the sorting is done in-place. an alternative would be to extract the strings to variables, so that they can be safely reused for both the input and expected arrays
Loading more items...