Binary search tree

D.Hering vel.accel at gmail.com
Fri Nov 9 16:33:13 EST 2007


On Nov 9, 4:06 pm, maxim.no... at gmail.com wrote:
> Hi,
>
> I have to get list of URLs one by one and to find the URLs that I have
> more than one time(can't be more than twice).
>
> I thought to put them into binary search tree, this way they'll be
> sorted and I'll be able to check if the URL already exist.
>
> Couldn't find any python library that implements trees.
> Is there some library of this kind in python? Or can I find it
> somewhere else?

Can you use set() or set.difference()?




More information about the Python-list mailing list