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
This comment is hidden because it contains spoiler information about the solution
python:
input:
'{5131690 ,q, 8385903 , 4 , 16663 , 18007 -> 49156109 29449627 837181 PuLPnQXRX RnxAT 5771 TzK } (9dipjokNPfJuC , U5TYfE)'output
''wait:
'(5131690,q,8385903,4,16663,18007){49156109;29449627;837181;PuLPnQXRX;RnxAT;5771;TzK;}(9dipjokNPfJuC,U5TYfE)'but we have
9dipjokNPfJuC(The definition of names is quite similiar to C/Java. Names like this are invalid:1a)It works up to 99 only.
This isn't the best solution and it works up to 99.
This comment is hidden because it contains spoiler information about the solution
Damn, I didn't know they equal whatever the order in those. What a shame
nice and elegant
Approved
Thank you, done
Looks great! I'd just suggest moving
rnd50,fizzBuzzArray, andcheckinto theDescribestruct & within aprivatesection, like how this example does itThis comment is hidden because it contains spoiler information about the solution
Thanks, noted.
The actual core logic in these tests is quite good, but the code violates a couple of the Codewars C++ authoring guidelines. Giving that page a good skim is important, and I've linked the relevant section beside each note below.
#includeall the header files it needs at the top (ex: the submission test cases should include<random>,<string>,<vector>, and<algorithm>forstd::min). Do not put#includein preloaded. (Docs - § Header files)unsignedis a more appropriate type forfandbsince they will never be negative, andstd::size_t(from<cstddef>) is a more appropriate type forsizeandi.reverseFizzBuzzshould not be astd::vectorbut instead a structure with a fixed compile time size of 2 numbers (any of the following are valid:std::pair<unsigned, unsigned>from<utility>(the best fit imo), orstd::tuple<unsigned, unsigned>from<tuple>, orstd::array<unsigned, 2>from<array>, or a customstructwith twounsigneds). (Docs - § Code style).ExtraMessage. (Docs - § Example Test Suite)C++ translation kumited :з
Loading more items...