java - c++学习数据结构应不应该用stl实现?
大家讲道理
大家讲道理 2017-04-18 10:48:58
0
5
762

数据结构初学者,之前有看过大话数据结构的线性表,栈,队列的内容,c实现的。学校这学期开数据结构c++,我直接看国外的教材,里面都是stl实现的,比如线性表数组描述删除一个元素是移动元素直接用copy,怎么移动的过程也没有,因为之前了解点数据结构还能理解,但越往后面担心只会记语法而不理解了,这本书关于数据结构的应用写的很详细。应该边看这本书,边看学校的教材(和大话一样挺通俗的)。还是直接看这本书作为正式入门数据结构的教材?


挺厚一本,应用偏多


一大堆,抛出异常和stl的语法

大家讲道理
大家讲道理

光阴似箭催人老,日月如移越少年。

reply all(5)
小葫芦

Get used to using STL, because what you are learning now is the data structure, not the STL source code. Your goal should be to understand the data structure, so don’t stick to these details, otherwise it will cost you a lot of time.

After reading the data structure, you can find a book on STL source code analysis.

大家讲道理

It doesn’t matter, this just simplifies the operation based on language features.
If you are really worried, you can look at the implementation in C language.

巴扎黑

Hello, I am also a beginner. Although I first used c++ (without stl) to learn data structures, and then pure c to learn data structures, but I think there is no absolute difference between good and bad. Hide The details can be more focused on the representation of the algorithm. Displaying the details can provide a deeper understanding of its specific implementation. It is really difficult to define which one is better and which one is worse. It is like tossing a coin. In fact, it does not matter which side is up. Some masters are Top-down learning, some great masters learn from the bottom-up. I think the conclusion drawn from this is that all can lead to the end. Instead of worrying about these, it is better to choose one and start learning immediately. Hesitation is the most wasteful In terms of time. I personally think it’s more appropriate to go directly to Jisuanke to learn the knowledge points and then study the corresponding data structure questions to get started. I also have the book on the topic...

左手右手慢动作

Personally think: If you have enough time to study, it is naturally better to be able to implement it yourself first and then use STL...

迷茫

You must learn to use stl for implementation. After all, using stl can speed up development efficiency. For beginners, it is recommended not to use stl purely. stl is not omnipotent. In the end, you still need to understand the internal principles of the data structure, so that you can use stl to implement it more easily. In addition, it is better not to use it for school courses, otherwise the submitted homework will only include the relevant header files and almost no implementation of its own. You can also use simple stl to stack complex data structures.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template