×

Loading...

Steven, 在Chinasmile 的问题我在这里解答了. 关于STREAM我想你在相关书上能找到答案吧 What are the advantages and disadvantages of using a Binary Search on a tree? What is the difference between a vector and an array?

The advantage of binary search tree is only take o(finding) time to insert and delete one element, but because it is not a balance binary search tree, so the height of tree can be o(n) , it will take o(n) time to finding an element.

A vector looks like an expandable array , but vector provide functions to insert and delete element by postion. Array can only be passed by reference, but vector can be passed by reference and value. Array can not be return value of a function , but vetctor may be the return value of a function.
Report

Replies, comments and Discussions: