Question
Draw a graph as a graph. Assume there is graphics library to draw lines and all. Just tell how will you order the vertices such that the edges don’t intersect and they seem ordered.
Solution
There’s no clear solution. Someone suggest the following:
- printing topological sort result (refer to post ‘Topology Sort’)
- edges should not intersect, finding if a graph is planar
There’s various Planarity Testing Algorithms.