GeeksforGeeks » Miscellaneous

Graph representations

(2 posts)

Tags:

  1. geek
    guest
    Posted 1 year ago #

    What r the differencces between following representations of Graph

    1) Adjacency List Representation
    2) Adjacency Matrix Representation

    Are there any problems or standard algos which work for one representation and not for other?

  2. kartik
    Moderator
    Posted 1 year ago #

    In Genereal, Linked List representation is used for sparse graphs (Graphs where connectevity between nodes is less) and Matrix representation is used for dense graphs.

    Floyd Warshall All Pair Shortest Path is one algo which works only with Adjacency Matrix Representation.


Reply

You must log in to post.

RSS feed for this topic