Why is my method going into infinite recursion?

前端 未结 6 1417
心在旅途
心在旅途 2021-01-15 11:34

I\'ve written a method to help build a quadtree. Each quadtree has a root node, and a root node has 4 children. I\'m using depth recursion to stop this function from dividin

6条回答
  •  一个人的身影
    2021-01-15 11:46

    If the n->isLeaf() condition means "all n's children are null", then I suppose it is always false here.

提交回复
热议问题