Go Back   Rhinocerus > Newsgroup > Newsgroup comp.lang.python

Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 07-03-2012, 01:39 PM
Miheer Dewaskar
Guest
 
Posts: n/a
Default Re: Best data structure for DFS on large graphs

On Tue, Jul 3, 2012 at 4:53 PM, Stefan Behnel <stefan_ml@behnel.de> wrote:
>
> Miheer Dewaskar, 03.07.2012 13:11:
> > I am not sure,but if there are large number of states Dictionaries wont
> > help much right?

>
> Dicts are fast for lookup, not for searching.
>

What do you mean by searching in the context of Dicts?

> > Anyway, does python have a built-in BST like data-structure ?

>
> It has lists and bisect:
>
> http://docs.python.org/library/bisect.html


But insertion and deletion in a list is o(n):

http://wiki.python.org/moin/TimeComplexity/#list




--
Miheer Dewaskar
Reply With Quote
Alt Today
Advertising
 
and become member of Rhinocerus
Standard Sponsored Links

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




All times are GMT. The time now is 02:06 PM.


Copyright ©2009

LinkBacks Enabled by vBSEO 3.3.0 RC2 © 2009, Crawlability, Inc.