/* related posts with thumb nails */

Differentiate Graph and Tree.:

Tree

Graph

A tree is a data structure in which each node is attached to one or more nodes as children

A graph is a collection of vertices or nodes, which are joined as pairs by lines or edges

This is a non linear data structure

This is a non linear data structure

All the trees can be graphs

All the graphs are not trees

It provides six different traversals

It provides two different traversals

It is undirected and connected

It can be directed or undirected; can be connected or not-connected

It cannot be cyclic

It can be cyclic or acyclic

Related Topics:

1 comments:

yamuna said...

Its an awesome site in which explained all the concept very clearly in easiest way. I loved it:-)Thanks a lot:-)

Post a Comment