图的遍历,深度遍历和广度遍历

图的深度遍历和广度遍历怎么画出树结构?
如果有例题然后详细解释就好了,求求各位大神相助。马上考试了慌得不行

https://blog.csdn.net/qq_39200794/article/details/120774498?utm_source=app&app_version=4.19.1&code=app_1562916241&uLinkId=usr1mkqgl919blen