Ad
  • Custom User Avatar

    I don't think the comment 'we do not recommend general use of these functions' applies, becaue this is not one of those undocumented internal-use builtins.

  • Custom User Avatar

    Should this be best practice? In gcc project they say:

    "GCC provides a large number of built-in functions other than the ones mentioned above. Some of these are for internal use in the processing of exceptions or variable-length argument lists and are not documented here because they may change from time to time; we do not recommend general use of these functions."

    https://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html

  • Default User Avatar

    What the hell? How is that clever

  • Default User Avatar

    it's not fair

  • Custom User Avatar

    @B4B You still didn't mark it as spoiler! x/

  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Default User Avatar

    It doesn't compile in another compilers. For example try to compile it into Visual Studio C++

    Also, the implementation it's not yours. You're using a builtin function that only the GCC compiler has implemented. So, I must say that it's only a nice trick. But must not be considered best practice by no means.

    It's faster than other implementations (including mine)? YES
    Has been implemented by you? NO
    Must be considered a solution to the exercise? NO!

  • Custom User Avatar
    1. SPOILER FLAG!! Damn you! x/
    2. there is always an overhead about the docker/runner/.... Comparing the performances like you do right now is totally pointless and actually totally nuts. Moreover when there are random tests, and when the time you use includes the generation of the tests too.
  • Default User Avatar

    It works, right?

  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    Enabled Python 3.6.

  • Default User Avatar

    Please make sure you store the number of values in the array you are returning from the function in the memory pointed to by the pResultCount pointer.

    That description is for C misleading and is no help at all. I think there is something missing to.

    The function returns an array of the counted monkeys. And make sure, that you store the amount of counted monkeys in the memory location where pResultCount points to.

  • Default User Avatar

    having the same issue, trying to solve it in C.
    while all random test pass only this one throws a signal code 11.

    as sample test it passes too.
    verify_fixed(no_space("8 j 8 mBliB8g imjB8B8 jl B"), "8j8mBliB8gimjB8B8jlB");