Ad
  • Custom User Avatar

    OP solved it, closing

  • Custom User Avatar

    Close enough, but you missed this part If the **final result** is longer than 140 chars it must return false.

  • Custom User Avatar

    thank you!

  • Custom User Avatar

    That's a problem with your code, not a kata issue, you only test match doesn't return null and then you work with the original string. While chaining methods seems nice, it makes more difficult to know where your code is wrong. Only chain when you're sure about what your code does.

  • Custom User Avatar

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

  • Custom User Avatar

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

  • Custom User Avatar

    Thanks for the clarification. For some reason I expected that it is intended to use the RDI-pointer not only for the length but also for the result arr. Have a nice day.

  • Custom User Avatar

    The result is a dynamically allocated (e.g., with malloc) array. The address of this array should be returned in rax. The length of this array should be written into [rdi].

    I recommend to solve this kata in C first because the C version has the same requirements as NASM.

  • Custom User Avatar

    Because your code is too slow for big inputs:

    Take a look at performance: some lists have thousands of elements.

  • Custom User Avatar

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