本書使用流行的Java語言作為描述語言,詳細(xì)介紹了數(shù)據(jù)結(jié)構(gòu)和算法。全書共分為五大部分。及時(shí)部分的Java教程是全書的基礎(chǔ),具體講述Java的運(yùn)行環(huán)境、數(shù)據(jù)類型和運(yùn)算符、基本語法等;同時(shí)介紹了面向?qū)ο蟮囊恍└拍睢5诙糠謱?duì)Java應(yīng)用程序接口集(API)中的各種數(shù)據(jù)結(jié)構(gòu)接口和其中涉及到的算法及算法分析進(jìn)行了詳細(xì)介紹,并用實(shí)例說明了如何使用這些數(shù)據(jù)結(jié)構(gòu)。第三部分是這些數(shù)據(jù)結(jié)構(gòu)在實(shí)際中的應(yīng)用,每一章對(duì)不同應(yīng)用的理論和具體實(shí)現(xiàn)做了詳盡闡述。第四部分則是針對(duì)第6章應(yīng)用程序接口集中介紹過的各種數(shù)據(jù)結(jié)構(gòu)接口,分別給予更加細(xì)致的實(shí)例解說。第五部分介紹了一些高級(jí)的數(shù)據(jù)結(jié)構(gòu)。 通過對(duì)本書的學(xué)習(xí),讀者能夠抽象地思考不同數(shù)據(jù)結(jié)構(gòu)的功能,了解它們之間的相關(guān)性,掌握在計(jì)算機(jī)工程中使用這些數(shù)據(jù)結(jié)構(gòu)的能力。 本書概念清楚,邏輯性強(qiáng),內(nèi)容新穎,可作為高等院校計(jì)算機(jī)軟件專業(yè)與計(jì)算機(jī)應(yīng)用專業(yè)學(xué)生的雙語教材和參考用書,也可供計(jì)算機(jī)工程技術(shù)人員參考。
通過重點(diǎn)考慮抽象思考及問題的求解,本書提供了對(duì)數(shù)據(jù)結(jié)構(gòu)及算法的實(shí)際介紹。暢銷書作教授Mark Allen Weiss獨(dú)辟蹊徑,清晰地分離了數(shù)據(jù)結(jié)構(gòu)的接口及實(shí)現(xiàn)。計(jì)稅針在本書的第二部分學(xué)習(xí)數(shù)據(jù)結(jié)構(gòu)的接口及運(yùn)行時(shí)間,以及在各種實(shí)際例子中如何使用數(shù)據(jù)結(jié)構(gòu)。在這之后的第四部分中,Weiss教授介紹了數(shù)據(jù)結(jié)構(gòu)的實(shí)現(xiàn)。通過熟悉接口及使用數(shù)據(jù)結(jié)構(gòu),讀者將能夠更加抽象地思考各種數(shù)據(jù)結(jié)構(gòu)的功能以及潛在的功效。
Mark Allen Weiss 的普林斯頓大學(xué)獲得計(jì)算機(jī)科學(xué)博士學(xué)位現(xiàn)任佛羅里達(dá)國(guó)際大學(xué)計(jì)算機(jī)科學(xué)學(xué)院教授。他在研究的內(nèi)容包括數(shù)據(jù)結(jié)構(gòu)、算法及教育,因他的數(shù)據(jù)結(jié)構(gòu)教科書而聞名。本書受到高度稱贊,并被世界各地的上百所大學(xué)所彩。他現(xiàn)任高級(jí)計(jì)算機(jī)科學(xué)發(fā)展委員會(huì)主席。
PART 1:TOUR OF JAVA
CHAPTER 1 Primitive Java
1.1 The General Environment
1.2 The First Program
1.2.1 Comments
1.2.2 main
1.2.3 Terminal Output
1.3 Primitive Types
1.3.1 The Primitive Types
1.3.2 Constants
1.3.3 Declaration and Initialization of Primitive Types
1.3.4 Terminal Input and Output
1.4 Basic Operators
1.4.1 Assignment Operators
1.4.2 Binary Arithmetic Operators
1.4.3 Unary Operators
1.4.4 Type Conversions
1.5 Conditional Statements
1.5.1 Relational and Equality Operators
1.5.2 Logical Operators
1.5.3 The if Statement
1.5.4 The while Statement
1.5.5 The for Statement
1.5.6 The do Statement
1.5.7 break and continue
1.5.8 The swjtch statement
1.5.9 The Conditional Operator
1.6 Methods
1.6.1 Overloading of Method Names
1.6.2 Storage Classes
Summary
Objects of the Game
Common Errors
On the Internet
Exercises
References
CHAPTER 2 Reference Types
2.1 What Is a Reference?
2.2 Basics of Objects and References
2.2.1 The Dot Operator(.)
2.2.2 Declaration of Objects
2.2.3 Garbage Collection
2.2.4 The Meaning of =
2.2.5 Parameter Passing
2.2.6 The meaning of ==
2.2.7 No Operator Overloading for Objects
2.3 Strings
2.3.1 Basics of String Manipulation
2.3.2 String Concatenation
2.3.3 Comparing Strings
2.3.4 Other String Methods
2.3.5 Converting Other Types of Strings
2.4 Arrays
2.4.1 Declaration,Assignment,and Methods
2.4.2 Dynamic Array Expansion
2.4.3 ArrayList
2.4.4 Multidimensional Arrays
2.4.5 Command-line Arguments
2.5 Exception Handling
2.5.1 Processing Exceptions
2.5.2 The Finally Clause
2.5.3 Common Exceptions
2.5.4 The throw and throws Clauses
2.6 Input and Output
2.6.1 Basic Stream Operations
2.6.2 The StringTokenizer Type
2.6.3 Sequential Files
Summary
Objects of the Game
Common Errors
On the Internet
Exercises
CHAPTER 3 Objects and Classes
CHAPTER 4 Inheritance
PART II:ALGORITHMS AND BUILDING BLOCKS
CHAPTER 5 Algorithm Analysis
CHAPTER 6 The Collections
CHAPTER 7 Recursion
CHAPTER 8 Sorting Algorithms
CHAPTER 9 Randomization
PART III:APPLICATIONS
CHAPTER 10 Fun and Games
CHAPTER 11 Stacks and Compilers
CHAPTER 12 Utilities
CHAPTER 13 Simulation
CHAPTER 14 Graphs and Paths
PART IV:IMPLEMENTATIONS
CHAPTER 15 Inner Classes and Implementation of ArrayList
CHAPTER 16 Stacks and Queues
CHAPTER 17 Linked Lists
CHAPTER 18 Trees
CHAPTER 19 Binary Search Trees
CHAPTER 20 Hash Tables
CHAPTER 21 A Priority Queue:The Binary Heap
PART V:ADVANCED DATA STRUCTURES
CHAPTER 22 Splay Trees
CHAPTER 23 Merging Priority Queues
CHAPTER 24 The Disjoint Set Class
APPENDICES
APPENDIX A Operators
APPENDIX B Graphical User Interfaces
B.1 The Abstract Window Toolkit and Swing
B.2 Basic Objects in Swing
B.2.1 Component
B.2.2 Container
B.2.3 Top-level Containers
B.2.4 JPanel
B.2.5 Important I/O Components
B.3 Basic Principles
B.3.1 Layout Managers
B.3.2 Graphics
B.3.3 Events
B.3.4 Event Hankling:Adapters and Anonymous inner Classes
B.3.5 Summary:Putting the Pieces Together
B.3.6 Is This Everything I Need To Know About Swing?
Summary
Objects of the Game
Common Errors
On the Internet
Exercises
References
APPENDIX C Bitwise Operators
Index