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.
OP solved it, closing
Close enough, but you missed this part
If the **final result** is longer than 140 chars it must return false.
thank you!
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.This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
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.
The result is a dynamically allocated (e.g., with
malloc
) array. The address of this array should be returned inrax
. 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.
Because your code is too slow for big inputs:
This comment is hidden because it contains spoiler information about the solution