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 |
Differentiate Graph and Tree.: |
You might also like:
Subject :
Java
1 comments:
Its an awesome site in which explained all the concept very clearly in easiest way. I loved it:-)Thanks a lot:-)
Post a Comment