We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Yep you can, but you need to implement a Random number generator exactly how java.util.Random does, both the seeding as well as generating the next random number
This is one thing which really puzzled me in this problem. The problem as it is, is not that hard to solve for people using Java or other languages which probably use the identical PRNG implementation.
I still have the question, whether the authors intended the problem to be solved this way or there is a better approach which is not obvious.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
PRNG Sequence Guessing
You are viewing a single comment's thread. Return to all comments →
Yep you can, but you need to implement a Random number generator exactly how
java.util.Random
does, both the seeding as well as generating the next random numberThis is one thing which really puzzled me in this problem. The problem as it is, is not that hard to solve for people using Java or other languages which probably use the identical PRNG implementation.
I still have the question, whether the authors intended the problem to be solved this way or there is a better approach which is not obvious.