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 is very much readable if you make it a bit less cramped (like in my solution).
C++ translation, with random tests
This should really be a 7kyu. ( So if you find it hard for an 8kyu, that might be correct. )
Don't hold your breath everyone, but I'll raise the issue at the appropriate place.
Approved
LGTM! I would've personally loved to see
generateTestCase
further simplified as below, but it's good as-isPoint 1 is now fixed too.
Point 2 is now fixed
I heavily encourage you to add the Python fixed tests, splitting them into an
It(all_consecutive)
andIt(non_consecutive)
. The two tests from JS are too little imoFrom the description:
This means
std::generate(result.begin(), result.end(), [&] { return randint(-1e6, 1e6); } );
is non-compliant since it can generate duplicates and is not guaranteed to be sortedOptioal, but
fmt::format("numbers = {{{}}}\n", fmt::join(numbers, ", "))
is unnecessary becausefmt::format("numbers = {}\n", numbers)
will output the same exact thinglgtm, approved
this piece of code is a friendly reminder that heavy string-work should be done in any language but C or assembly
C++ translation ready for review (author is inactive).
.
Rejected:
first
at all.std::pair
or, for this case specifically,std::optional
is usually the better choice here).Lua translation
This comment is hidden because it contains spoiler information about the solution
Loading more items...