Well if we are talking about programming, then I would use a set.
Load the content of the bag into a set, try to take out all the numbers from 1 to 100, if the operation fails the number is not in...