One of the questions that I have been asked lately

Imagine situation where we have a numbers from 1 to 100 all incrementing so we have 1,2,3, … ,99,100. Now we take one of them from this pool – randomly, then we are┬árandomize order of rest of them.

Question: what is the best way of finding out which number has been taken, and what is complexity of your algorithm?


Published by

Luke Iwanski

Senior Graphics Programmer @ CD Projekt RED

Leave a Reply

Your email address will not be published. Required fields are marked *