Hi folks,

What�s the best way to perform a search on a pdb? I like to use the binary
search algorithm but this one looks not so much efficient to solve my
problem.
I have a list with several products inside that are ordened by their product
class. When the user selects choose one class I must show him all products.
I tried the sequencial search but it is horrible, now I am triyng the binary
but when the code makes its division it may or not get ther first product of
my class, than I have to run back to find the first one. It is not good to.

ex.: 
class  product
1       1
1       2
1       3
1       4
1       5
2       1
2       2
2       3

the binary search will divide this list on the 4th item, even I found the
right product of my class I must run back to the first product by
comparision.

Does anybody have some ideas?

thank you very much

--
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to