Algorithm to fill in gaps in number series
I have an array of numbers, eg. 5, 12, 56, 123, 201

What I want to generate is a long string made up of either 0s or 1s, where based on the above numbers it would be all 0s except for 1s at position 5, 12, 56, etc.

What would the best algorithm to do this?

Please give your answer in VB6 code.
Algorithm to fill in gaps in number series
===

I have an array of numbers, eg. 5, 12, 56, 123, 201

What I want to generate is a long string made up of either 0s or 1s, where based on the above numbers it would be all 0s except for 1s at position 5, 12, 56, etc.

What would the best algorithm to do this?

Please give your answer in VB6 code.