GeeksforGeeks » Miscellaneous

Why 3 colors in BFS algo given in cormen book?

(1 post)
  • Started 1 year ago by geek

Tags:

  1. geek
    guest
    Posted 1 year ago #

    Why does the following link use 3 colors for BFS of graph. Same algo is given in Cormen book also.
    http://www.personal.kent.edu/~rmuhamma/Algorithms/MyAlgorithms/GraphAlgor/breadthSearch.htm

    The program could be implemented only with 2 (marked or not). In fact the algo given on Wiki page (http://en.wikipedia.org/wiki/Breadth-first_search#Pseudocode) uses only on 1 bit.


Reply

You must log in to post.

RSS feed for this topic