Sunday, 15 May 2011

Nonlinear data structures tree vs graph



Tree - is a hierarchical data structure of nodes.
Nodes are usually structured in the parent-child manner. However line joining two nodes has no significance.



Graph - similar to the tress except that line joining the nodes is also important (generally known as edge). In graph a edge could represent anything (time, distance etc possibilities are endless).  i.e. In a train map line may represent the distance or time.

In plain words a scaled train map in the example of graph whereas same train map without scaling is the example of a tree.



Moreover edges are broadly categorized in the two categories as follows:
            1) Bi-directional graph, i.e. edges is bidirectional.
            2) Unidirectional graph, ugh just opposite to bi-directional.
 

Friday, 6 May 2011

Hello World!

Hello from Umesh Mittal. This blog will contain some of my technical thoughts and learnings, as well as some personal ones.

Total Pageviews

Popular Posts