Are Trees Directed or Undirected Graphs?

Faizan picture Faizan · Jan 14, 2013 · Viewed 8.7k times · Source

I have read that Trees are special cases of Graphs. Graphs can be directed or undirected. but if we consider tree as a data structure is it directed or undirected graph?

Answer

Lie Ryan picture Lie Ryan · Jan 14, 2013

Unless qualified otherwise, trees in Mathematics or Graph Theory are usually assumed to be undirected, but in Computer Science or Programming or Data Structure, trees are usually assumed to be directed and rooted.

You need to be aware of the context of discussion.