Weekly Discussion

Weekly Discussion

Weekly Discussion

Number of replies: 10

Write down the difference between Tree and Graph


In reply to First post

Re: Weekly Discussion

by Sabrina Islam 193-15-2941 -
Tree: A tree is a data structure that simulates a hierarchical tree structure, with a root value and sub-trees of children with a parent node. There is a root node in a tree.
Graph: A data structure that consists of a group of vertices connected through edges. There is no root node.
In reply to First post

Re: Weekly Discussion

by Faria Binta Kalam(193-15-2918) -
Tree: A tree is a data structure that simulates a hierarchical tree structure, with a root value and subtrees of children with a parent node. There is a root node in a tree.
Graph: A data structure that consists of a group of vertices connected through edges. There is no root node.
In reply to First post

Re: Weekly Discussion

by Md. Rakib(193-15-2944) -
Graph and tree are the non-linear data structure which is used to solve various complex problems. A graph is a group of vertices and edges where an edge connects a pair of vertices whereas a tree is considered as a minimally connected graph which must be connected and free from loops.
In reply to First post

Re: Weekly Discussion

by NUSRAT JAHAN (193-15-2924) -
A tree is a data structure that simulates a hierarchical tree structure, with a root value and sub-trees of children with a parent node. There is a root node in a tree but graph is a data structure that consists of a group of vertices connected through edges. There is no root node.
In reply to First post

Re: Weekly Discussion

by Razia Sultana Misu(193-15-2976) -
Graph:
Graph is a non-linear data structure and there is no unique node called root in graph.
Tree:
Tree is a non-linear data structure and there is a unique node called root in trees.
In reply to First post

Re: Weekly Discussion

by Abdul Wahid 193-15-2992 -
Graph: A cycle can be formed in the graph.
Tree: There is no cycle in the tree.

Graph: More than one path is allowed.
Tree: Only one path between two vertices.

Graph: Graph use in Network model.
Tree: Tree use in Hierarchical model.
In reply to First post

Re: Weekly Discussion

by Al-Ifran (193-15-2915) -
Graph and tree are the non-linear data structure which is used to solve various complex problems. A graph is a group of vertices and edges where an edge connects a pair of vertices whereas a tree is considered as a minimally connected graph which must be connected and free from loops.
In reply to First post

Re: Weekly Discussion

by Al Amin 193-15-2981 -
A tree is a data structure that simulates a hierarchical tree structure, with a root value and sub-trees of children with a parent node. There is a root node in a tree but graph is a data structure that consists of a group of vertices connected through edges. There is no root node.
In reply to First post

Re: Weekly Discussion

by Joshinta Jerin -
ree: A tree is a data structure that simulates a hierarchical tree structure, with a root value and sub-trees of children with a parent node. There is a root node in a tree.
Graph: A data structure that consists of a group of vertices connected through edges. There is no root node.