开发者

What is the performance tradeoff with BST implemented using linked list or array?

I was just wondering what would be the perfor开发者_运维技巧mance ratio, between binary search tree implemented using a linked and a binary search tree implemented using an array. I just want to know the performance comparisons. I've already read this question in stackoverflow.


I do not think you can implement a binary search tree with an array. A binary search tree is like an advanced linked list. In fact, if you use a basic BST (not balancing) and input presorted data, you basically end up with a linked list.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜