阅读背景:

Java:数组上的广度优先遍历顺序

来源:互联网 

I wish to iterate over a sorted array in the order that a breadth first traversal would give if I put the array into a binary tree and performed a BFT on that (which is how I currently achieve this). Obviously this involves additional memory overhead since you need to build and store the array again in the binary tree. I know this should be similar to a binary search but I can't quite get the ordering right.I wish to iterate over a sorted array in the or




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: