-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
I was trying to understand https://github.com/godely/Problems/blob/master/Spoj/ANARC08C.cpp
But there were some concepts that I couldn't understand. It would be great if you could explain me that.
- For this loop, I could not understand why is
jincremented by2instead of1.
Line 85 in bf04a4c
| for (int j = last; j <= sz-vec[i].S.F; j+=2) { |
- I didn't get how is the value
tempHashcalculated. ( I get that it is formed by removing the previous part but still why it is not divided by length creates a confusion).
Line 86 in bf04a4c
| tempHash = hash[j+vec[i].S.F-1] - ((j == 0) ? 0 : hash[j-1]*B[vec[i].S.F]); |
Metadata
Metadata
Assignees
Labels
No labels