tongyafang

Results 1 comments of tongyafang

> > > 另外,关于根节点、左侧子节点、右侧子节点的i的值的计算,有些文章也跟您的不一样。: > ![image](https://user-images.githubusercontent.com/1953879/110756036-a1655a00-8284-11eb-9c65-b434330664d7.png) > > 此截图来自于:https://juejin.cn/post/6932718585173753869 > > > 我看了好几篇文章,都是说左边的孩子的i值计算是这样的: > > ![image](https://user-images.githubusercontent.com/1953879/110757052-e8a01a80-8285-11eb-8218-977d70252861.png) > > 跟你的2*i 不一样,怎么回事? 因为一般文章都是将数组的i = 0 的元素作为根节点的,但是本文中数组的 i = 0 的元素为空,所以将 i =...