search algorithms

  • Thread starter Thread starter decrypted
  • Start date Start date
D

decrypted

I am having trouble with creating / finding effective searching algorithms.
I constantly run into a situation where I have a list of objects and need to
find out if a property of one of these objects matches some
criteria...especialy if the criteria is a list itself. Example...

class Part has private PartID

A listview of items with each tag having a Part object.
I have an array of PartID's denoting the parts I want to remove from the
list.
The listview has a few hundred thousands records.

when the list is large like this, looping through the list mulltiple times
takes a long time. I am basicaly looking for seom direction on how to think
about developing structures with searching in mind using existing controls.

Thanks in advance
dec
 
and by going through them, he means: do a binary search on
the sorted list. Take a look at the Array class. It has
everything in it. You only need to implement the
IComparable interface in your data class.

Greetings,
BV
 
Back
Top