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.
ok, I did it
fixed
enables PHP 8.0 (cf. this issue)
this was fixed by the upgrade to C# 12
PHP 8.0 should be enabled
fixed
this is not surprising and that's exactly the problem with undefined behavior in C/C++ ... many things can happen depending on the platform, the way the code is run, the compiler, etc. the worst case scenario is when nothing special happens, until that one day when a cryptic bug pops up from nowhere. there are some tools that can help, such as static analyzers. when i ran your code in this one, it correctly detected UB when run with an empty string (warning, this analyzer is free and online but it's a bit slow and the UB diagnostics can be a bit cryptic if you're not well versed on low-level details)
the issue was due to the tests computing the actual answer before the expected one. fixed. I also modified the type signature for C#, as it was not in line with the description, it was taking an
object[]
instead of anint[]
as promised by the description. you will need to refresh the page and reset the sample tests to see the changes.breaking change:
changing the signature from
to
as the description promises:
the only reasons to pass an
object[]
array containing only integer were to mimic dynamically-typed languages and to allow programming by mutation, which is not typical for C# arrays.where do you see digits ?
fixed
const
to the output pointerfixed
Loading more items...