Okay, I really hate you guys.
Thank you for this. Sometimes (apparently) crack just doesn't cut it as a breakfast food for me...;-)
This comment is hidden because it contains spoiler information about the solution
Hate to say it, and it looks damn interesting, but I don't get it. I've read and re-read the instructions.
So I got my stuff working, except that 'state' in the packet is 2 bytes long, and the 'state' passed into the function is only 1 byte long. Thus, I placed the state into the packet, and padded the higher byte with a zero (0). Is this not the correct method? But in the example packet, no zero is padded, and the packet has only a 1 byte state.
I am using printf, but if it fails, I get no returned printf info from the codewars server.
I have been - I just don't know how to test my code further to find out why it does not work. If the test does not work, the debug information is not passed back from the server whatsoever.
So, if the crc8 function returns a zero (0), the packet is valid?
Very nice kata, haven't done it yet but looking forward to it. Good parsing AND recursion practice, and as an old C and Assembly programmer, I enjoy the nosalgic past! ;-) Also, the link to 'reveal' the answer to the large struc does not work.
So this is what insane people do...;-)
You young people with your cleverness...I'm gonna have to stop fighting learning Regex...;-)
I finished, but the upperbound was, in many cases, exceeding 1,000,000. Just FYI. It was interesting, as I had to optimize my code for speed, which I do enjoy! ;-)
Got it! Thank you!
Why is this so difficult to understand, despite my 'attentiveness?' (Btw 'argements' s/b 'arguments.')