Writing in C (and using only the C std lib as building blocks, which explicitly exclude C++ and all its stuff), generate 1 million unique random numbers.
For reference, here is the code in C#:
It is a brute force approach, I’ll admit, but it completes in about 150ms on my end. Solution must run in under 10 seconds.
This question just looks stupid, it actually can tell you quite a bit about the developer.