To represent hierarchical relationship between element, which data structure is suitable ?
To represent hierarchical relationship between element, which data structure is suitable ? Correct Answer Tree
A Graph consists of a finite set of vertices(or nodes) and a set of Edges which connect a pair of nodes. In the above Graph, the set of vertices V = {0,1,2,3,4} and the set of edges E = {01, 12, 23, 34, 04, 14, 13}. Graphs are used to solve many real - life problems such as representing networks. A tree is a nonlinear hierarchical data structure that consists of nodes connected by edges. মনে রাখতে হবে Tree এবং Graph এর মধ্যে মূল পার্থক্য হলো Loop. Tree data structure - এ কখনোই Loop তৈরি হবে না বরং এখানে চিত্রানুযায়ী hierarchical relationship বজায় থাকবে।
মোঃ আরিফুল ইসলাম
Feb 20, 2025