数据结构

出版时间:2012-6  出版社:科学出版社  作者:(美)梅因,(美)萨维特奇 著  页数:818  字数:1160000  
Tag标签:无  

内容概要

数据结构——C++版(第四版)(英文影印版)是一本基于C++的思想、介绍数据结构和算法的大学教材,已经在全球多个国家的大学用作数据结构课程的基础教材。数据结构——C++版(第四版)(英文影印版)以C++语言作为实现语言,利用面向对象的方法,从规格说明出发,使用基础的数据类型来描述程序算法的设计与实现。书中主要内容包括:软件开发的各个阶段,抽象数据类型与C++类,容器类,指针与动态数组,链表,用模板、迭代器和STL进行软件开发,堆栈,队列,递归思想,树,平衡树,查找,排序,派生类与继承,图表。通过学习数据结构——C++版(第四版)(英文影印版),可使读者具备使用数据类型的能力,学会利用多种方法来实现数据类型,以及从不同的实现中进行取舍。
数据结构——C++版(第四版)(英文影印版)可作为计算机、电类专业本科生和非信息技术专业硕士研究生的教材,也可供工程技术人员参考。

作者简介

作者:(美国)梅因(Michael Main) (美国)萨维特奇(Walter Savitch)

书籍目录

CHAPTER 1 THE PHASES OF SOFTWARE DEVELOPMENT
CHAPTER 2 ABSTRACT DATA TYPES AND C++ CLASSES
CHAPTER 3 CONTAINER CLASSES
CHAPTER 4 POINTERS AND DYNAMIC ARRAYS
CHAPTER 5 LINKED LISTS
CHAPTER 6 SOFTWARE DEVELOPMENT WITH TEMPLATES, ITERATORS, AND THE
STL
CHAPTER 7 STACKS
CHAPTER 8 QUEUES
CHAPTER 9 RECURSIVE THINKING
CHAPTER 10 TREES
CHAPTER 11 BALANCED TREES
CHAPTER 12 SEARCHING
CHAPTER 13 SORTING
CHAPTER 14 DERIVED CLASSES AND INHERITANCE
CHAPTER 15 GRAPHS
APPENDIXES
INDEX

章节摘录

版权页:   插图:   1 Specify, design, and implement a class that can be used in a program that simulates a combination lock. The lock has a circular knob, with the numbers o through 39 marked on the edge, and it has a three-number combination, which we'll callx, y, z. To open the lock, you must turn the knob clockwise at least one entire revolution, stopping with x at the top; then turn the knob counter-clockwise, stopping the second time that y appears at the top; finally turn the knob clockwise again, stopping the next time that z appears at the top. At this point, you may open the lock. Your lock class should have a constructor that initializes the three-number combination (use 0, 0, 0 for default arguments). Also provide member functions: (a)to alter the lock's combination to a new three-number combination (b) to turn the knob in a given direction until a specified number appears at the top (c) to close the lock (d) to attempt to open the lock (e)to inquire about the status ofthe lock (open or shut) (f)to tell you what number is currently at the top 2 Specify, design, and implement a class called statistician. After a statistician is initialized, it can be 2iven a seauence of double numbers. Each number in the sequence is given to the statistician by activating a member function called next_numbe r. For example, we can declare a statistician called s, and then give it the sequence of numbers1.1, -2.4, 0.8 as shown here: statistician s; s.next_number(1.1); s.next_number(-2.4); s.next_number(0.8); After a sequence has been given to a statistician,there are various member functions to obtain information about the sequence. Include member functions that will provide the length of the sequence, the last number ofthe sequence, the sum of all the numbers in the sequence, the arithmetic mean of the numbers (i.e., the sum of the numbers divided by the length of the sequence), the smallest number in the sequence, and the largest number in the sequence. Notice that the length and sum functions can be called at any time, even ifthere are no numbers in the sequence. In this case of an "empty" sequence,both length and sum will be zero. But the other member functions all have a precondition requiring that the sequence is non-empty.

编辑推荐

《数据结构:C++版(第4版)(英文影印版)》以C++语言作为实现语言,利用面向对象的方法,从规格说明出发,使用基础的数据类型来描述程序算法的设计与实现。《数据结构:C++版(第4版)(英文影印版)》可作为计算机、电类专业本科生和非信息技术专业硕士研究生的教材,也可供工程技术人员参考。

图书封面

图书标签Tags

评论、评分、阅读与下载


    数据结构 PDF格式下载


用户评论 (总计0条)

 
 

 

250万本中文图书简介、评论、评分,PDF格式免费下载。 第一图书网 手机版

京ICP备13047387号-7