Since I have time today,

来源: boss1010 2008-01-15 13:40:24 [] [旧帖] [给我悄悄话] 本文已被阅读: 0 次 (2591 bytes)
just going to write some more. A lot of test prep books target at training you as an "operator" rather than an "engineer" from my perspective. In which you will find lots of specifics stuff particularly true for a language or an environment; but very rare, these books will mention the back end stuff you truely need to know from fundementally what programming is about ...

For example, I fould that weeks ago, the people here try to answer the diff between Vector and List in Java is mainly thread. That is purely an "operator" view of point, from an "engineer" view of point. You should know following, but I guess no test prep book will go there.

In any modern programming language, there is something called Container or Collection. Usually, there are two big groups in this category, Linear and Non-Linear. In Linear, there are basic Linear, and special Linear; in Non-Linear, mainly we mean associative collection, there are hash, tree and other. Again, in the basic Linear there are three main things, Vector, List and Deque (if you know what is Deque, you are pretty senior). And in special Linear, there are three main things, Stack, Queue, and Priority Queue. And then, in the Non-Linear (should be key and value), you usual have Set and Map. For sure, you will have some HashMap and TreeMap. Those are main things in Container/Collection.

Collection
Linear
Basic
Vector
List
Deque ...
Special
Stack
Queue
Priority Queue ...
Non-Linear
Set
Map
HashMap
TreeMap ...

As a matter of fact, all special linear collections are implemented by some basic linear data structure. While most non-linear things are implemented by either tree or hash data structure.

And then what is the main diff in vector and list, for all the reasons, you have to know the ABC, that is vector is more like an array, that is fast in random access, but slow in inserting and deleting ... However, the list is on the contrary, fast in inserting and deleting, but slow in random access (need an iterator) ...

As for other details, you guys can find more easily from any basic computer books. It just happens that Java has a special thing for thread safe for vector (and lots of other languages never do). To be honest, I do not know Java is thread safe for vector; however, I definitely know the big picture and indepth about the things behind the collection/container ...

That is important for you and not those details ...
请您先登陆,再发跟帖!

发现Adblock插件

如要继续浏览
请支持本站 请务必在本站关闭/移除任何Adblock

关闭Adblock后 请点击

请参考如何关闭Adblock/Adblock plus

安装Adblock plus用户请点击浏览器图标
选择“Disable on www.wenxuecity.com”

安装Adblock用户请点击图标
选择“don't run on pages on this domain”