Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #24819 > unrolled thread

Re: Best data structure for DFS on large graphs

Started byMiheer Dewaskar <miheer.dew@gmail.com>
First post2012-07-03 19:09 +0530
Last post2012-07-03 19:09 +0530
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Best data structure for DFS on large graphs Miheer Dewaskar <miheer.dew@gmail.com> - 2012-07-03 19:09 +0530

#24819 — Re: Best data structure for DFS on large graphs

FromMiheer Dewaskar <miheer.dew@gmail.com>
Date2012-07-03 19:09 +0530
SubjectRe: Best data structure for DFS on large graphs
Message-ID<mailman.1742.1341322787.4697.python-list@python.org>
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

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web