|
-
July 12th, 2006, 01:38 PM
#1
A Need for an Algorithm
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
-
July 12th, 2006, 05:55 PM
#2
Re: A Need for an Algorithm
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.
"Programs must be written for people to read, and only incidentally for machines to execute."
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|