- 0
- 0
- 约1.45万字
- 约 60页
- 2018-04-12 发布于江西
- 举报
数据结构 第一章 Chapter 1.ppt
Storage Containers ( General ) Storage Containers ( Vectors) A vector has all of the nice indexing features of an array along with the ability to dynamically grow to meet demand. Storage Containers ( Vectors) A vector is a super-array“, meaning all familiar array algorithms work. You also have the freedom to to grow or shrink (收缩)it. Storage Containers ( Vectors) Vectors allow for direct access to their elements through an index, but are not efficient storage structures for: insertion of items at arbitrary positions in a list. deletion of items at arbitrary positions in a list. Storage Containers ( Lists ) list container each element has a reference that identifies the next item in the list. Adding a new item involves breaking a link in the chain and creating two new links to connect the item. Storage Containers ( Maps ) First Look at ADTs Implementations For a programming task we must identify The collection of data items Basic operations to be performed on them Taken together (data items operations) are called an Abstract Data Type (ADT) Implementation Storage structures for the data items Algorithms for the operations (参见第2章) Data Structures, Abstract Data Types, and Implementations Consider example of an airplane flight with 10 seats to be assigned Tasks List available seats Reserve a seat How to store, access data? 10 individual variables An array of variables (参见第3章) Abstract Data Types ADT Operation Description operationName: Action statement that specifies the input parameters, the type of operation on the elements of the data structure, and the output parameter. Preconditions: Necessary conditions that must apply to the input parameters and the current state of the object to allow successful execution of the operation. Postconditions: Changes in the data of the structure caused by the o
您可能关注的文档
最近下载
- 2026最新人教版四年级下册语文全册教案.pdf VIP
- 外研社2023跨境电商交际英语(修订版)教学课件unit5.pptx VIP
- 济宁职业综评往年真题及答案2025.doc VIP
- 《二维设计基础》 第五章 掌握二维设计的应用.pptx
- 《物业管理师》三级习题库含参考答案.docx VIP
- 20J333 建筑防腐蚀构造.docx VIP
- 五年级下册道德与法治第1课《读懂彼此的心》PPT教学课件(第一课时).pptx VIP
- 线性代数课件(完整版)同济大学.ppt VIP
- JJF(新)46-2019-热电偶补偿导线校准规范(终稿).docx VIP
- 31(程序文件)认可标识使用和认可状态声明管理程序2021最新版.docx VIP
原创力文档

文档评论(0)