Use the PRNG with seed 4020 (first 3 numbers are -2123524894 961034805 1071375651) to generate 10^10 integers. Print the 10^5th largest element among the numbers generated.
Of course if the problem was at a smaller scale, I would have been able to solve it in a click, but I cannot figure out how to solve it. One approach was using the median using heaps method(BAD IDEA), then tried to div the input into chunks and try finding it in those, but none of those approaches are to work. I think I am getting stuck on the wrong things , there is no way this problems solution requires a supercomputer to calculate, so of course my thinking is wrong, can you help point me in the right direction as to what I can do to solve this?
Notice that 10^10 is much (100,000 times) larger than 10^5, so avoid storing all 10^10 integers.
One approach could be this: