Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.programming > #8200
| From | David Brown <david.brown@hesbynett.no> |
|---|---|
| Newsgroups | comp.programming |
| Subject | Re: Breadth first search or depth first search? |
| Date | 2017-12-11 11:17 +0100 |
| Organization | A noiseless patient Spider |
| Message-ID | <p0llvs$179$1@dont-email.me> (permalink) |
| References | <p0kpcd$r18$1@gioia.aioe.org> |
On 11/12/17 03:09, Victor Porton wrote: > Small graph, need to check if two given nodes are connected. > > Breadth first search or depth first search? (which of two is better?) > If the graph is small, it will not make much difference. It normally makes most difference when you have cache effects, or want to limit recursion depth, or want to avoid more advanced data structures, or have trees/graphs of a particular shape, or know a bit about where you are most likely to find a result. None of that typically matters for a small graph - use whatever makes it easier to write correct and clear code. > Or incidence matrix? >
Back to comp.programming | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Breadth first search or depth first search? Victor Porton <porton@narod.ru> - 2017-12-11 04:09 +0200
Re: Breadth first search or depth first search? David Brown <david.brown@hesbynett.no> - 2017-12-11 11:17 +0100
Re: Breadth first search or depth first search? Öö Tiib <ootiib@hot.ee> - 2017-12-11 14:30 -0800
Re: Breadth first search or depth first search? Victor Porton <porton@narod.ru> - 2017-12-12 11:16 +0200
Re: Breadth first search or depth first search? Öö Tiib <ootiib@hot.ee> - 2017-12-13 21:02 -0800
csiph-web