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.
I like your sete. Good thinking!
I found my mistake. Keep an eye on your register sizes. I started with 8bit regs, and only switched to 64bit regs when I saw the random long str test. I simply forgor to change 1 line to get a 64bit value and not only 8bit.
This comment is hidden because it contains spoiler information about the solution
NASM. My code solves all BasicTests and RandomTests. TestsStringsUpTo40kLenForPerfomanceAssesment then fails on the first tested string pair. It is not a time out, it says "Incorrect answer for". Any ideas for potential pit falls when handling these very long strings?
NASM translation Please have a look at it.
In addition to monadius note. I tried malloc before and I got a sigsegv. I doubted malloc at that point, but it was a special case that caused this crash. So for anyone else struggling, watch out for special test cases. There is a sneaky one.
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.
Another thanks for your explanation and your provided link. Have a nice day.
NASM question. In which format is the result expected? So far I figured out, that I return a pointer, which I received in [rdi], and I put the length of my out arr into [rdi+0], then I can not use [rdi+8]. All my numbers are stored in [rdi+n*8+8]. As last part I move rdi into rax, but with an offset. I can not set the offset to 16, this just crashes. Offset = 0, and my result list is off by two positions. Offset = 8, and my result list is off by one position. Offset = 24 and my result is off by one but in the other direction.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This kata is about learning and using string operations. This is the learning goal. Why do you need these string operations? Imagine you write a small programm that reads an input number and squares the number. In many languages, this includes Python, you will receive a string as an input from the user. So it's important for you to know what to do if you receive a string while wanting to do some math with the input.
Are the NASM hidden tests working as intended? The visible tests already test 6,4 with result 23 and I can solve all the visible tests. When attempting the hidden tests, I can print that both numbers are also 6,4 but this time they expect a 1919,
Loading more items...