Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] array duplicate check [C]



On 4/18/07, Birkir A. Barkarson <birkirb@example.com> wrote:
> So how can I improve the algorithm? ( for the worst case ) I have a
> feeling that I can reduce the complexity to N or M...
>
> Any helps are appreciated.

Just a couple of ideas...

1) Keep one of the vectors sorted and use a search (binary search for example
should be about N*logM)

Thank you. This is enough for me.

2) Get a quantum computer and improve the performance to N*sqrt(M)
Would you kind enough to buy me one? :D. Yeah, I always love reply
like me. Consider my food the half-brain at weekend.

--
Best Regards,
Nguyen Hung Vu
vuhung16plus{remove}@example.com
VIQR Standard: http://vi.i18n.kde.org/viqr
http://www.flickr.com/photos/vuhung/tags/fav/


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links