You are viewing a single comment's thread. Return to all comments →
Aren't you trailing a red herring with that upper bound on k?
Don't worry. If k>=n-1, any two sequences of length n would be similar. So the real upper limit is that of n, which is 10^5.
That's exactly what I meant by the upper bound of 10^9 on k being a red herring.
Seems like cookies are disabled on this browser, please enable them to open this website
I agree to HackerRank's Terms of Service and Privacy Policy.
Minimal Cyclic Shift
You are viewing a single comment's thread. Return to all comments →
Aren't you trailing a red herring with that upper bound on k?
Don't worry. If k>=n-1, any two sequences of length n would be similar. So the real upper limit is that of n, which is 10^5.
That's exactly what I meant by the upper bound of 10^9 on k being a red herring.