BFS关键点

  1. queue存储访问顺序
  2. 记录访问过的点
  3. 用queue当前的size判断本层元素个数

results matching ""

    No results matching ""