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.
The posts here are visible in the homepage for everyone too if not marked as spoilers. That's why when disclosing information about the solution, they should be marked. There are comments that don't need it, see the ones below, most of them don't.
Chrono79, what are you doing in the comments of a solution, if not spoiling the solution? 🤔
You're not alone =)
This comment is hidden because it contains spoiler information about the solution
Ok nmv I fixed the darkmode lightmode bug
Thanks for solving it man :)
int[]
, should I use anArrayList<Integer>
instead?In few words(very simplistic):
1 step: we take original GP (l=18) increase it with LT from MP (l=9), then apply XOR with original MP (l=9) and finally have new MP (discarding: l=18-1 = 17)
2 step: we take original GP (l=18) increase it with LT from new MP (l=17), then apply XOR with new MP (l=17) and again have new MP (discarding: l=18-1 = 17)
if after XOR we have 2 zero lead terms, then have to discard them both and jump over next step (!):
3 step: we take original GP (l=18) increase it with LT from new MP (l=17), then apply XOR with new MP (l=17) and again have new MP (discarding: l=18-2 = 16)
4 step: skip
5 step: we take original GP...
GP - generator polynomial, length = 18
LT - leading term of message polynomial
MP - message polynomial, length = 9 at first step, and 17 at every other step
I suffered a little searching for errors, but finally decided. A few suggestions and comments:
Basically, I wasted a lot of time on "Very rarely it can happen that ...." =))
Thanks for the great kata!
It has become smaller than the original generator polynomial.
At second step take lead term from new message polynomial
Good luck :)
Sorry, I have 2 stupid questions =)
First we had message polynomial with length 9.
Then we get through first step (lead term was 64) and our new message polynomial became 17 length. But here is written that "this is our new message polynomial, it has become smaller".
So first question is why it has become smaller if length = 9 >>> length = 17.
The second one is: which term will be the lead term at second step of our example? 168 (from new message polynomial) or 36 (from original MP)?
Thanks!
I like it. All solutions sorting elements first are not efficient, i think.
What's the point of sort all elements first in for example a million elements array if unique element at it's beginning.
Java is available now
Loading more items...