目录1、深度优先2android、广度优先在编程编程生活中,我们总会遇见树性结构,这几天刚好需要对树形结构操作,就记录下自己的操作方式以及过程。现在假设有一颗这样树,(是不是二叉树都没关系,原理都是一样的)
Seems like this might be easy, but from reading other SO answers there are a number of ways for it to possibly work: