Click to See Complete Forum and Search --> : A Need for an Algorithm


Pravish
July 12th, 2006, 01:38 PM
Hey there
consider this..... I have a very large array(2d) that stores integer values ranging from
0-360. i wish to find out those memory locations that contain values ranging from 50-100. Since the array is very large i do not wish to carry out a sequential execution.
There r many locations that have values in the given range, but the number of such locations are relatively less as compared to the array size.
Can anybody suggest me some algorithm to find these memory locations with out checking the array sequentially. Is it illogical???

I do not want to go for a searching algo cause i ll be accessing the array just once....kindly suggest something

Thanks
regards

RoboTact
July 12th, 2006, 05:55 PM
If you don't control this data structure, you can't find cells by condition without looking them all up. If you do, you can create some sort of structure that supports set of cells satisfying your condition and add elements there as you set values in that array.