We’ve seen how to do the naive approach towards pattern matching. So what about other algorithms that are much more better at doing this task? This is the Knuth-Morris-Pratt (KMP) algorithm for pattern matching.
Showing posts with label Search. Show all posts
Showing posts with label Search. Show all posts
Monday, 3 January 2011
Tuesday, 18 May 2010
Algorithms – Depth/Breadth First Search
We have seen some of the key concepts to Graphs; What a node is, an edge – as well as definitions for Digraphs and Undirected Graphs – and other bits ‘n’ bobs :) .
But one question stills looms; How do we traverse a Graph?
Here we shall look at two of the key traversing algorithms for Graphs:
- Depth First Search (DFS), and
- Breadth First Search (BFS).
Labels:
Algorithms,
Breadth,
Computer Science,
Depth,
First,
graphs,
Queue,
Search,
Stack
Subscribe to:
Posts (Atom)