本書使用流行的Java語言作為描述語言,詳細介紹了數據結構和算法。全書共分為五大部分。及時部分的Java教程是全書的基礎,具體講述Java的運行環境、數據類型和運算符、基本語法等;同時介紹了面向對象的一些概念。第二部分對Java應用程序接口集(API)中的各種數據結構接口和其中涉及到的算法及算法分析進行了詳細介紹,并用實例說明了如何使用這些數據結構。第三部分是這些數據結構在實際中的應用,每一章對不同應用的理論和具體實現做了詳盡闡述。第四部分則是針對第6章應用程序接口集中介紹過的各種數據結構接口,分別給予更加細致的實例解說。第五部分介紹了一些高級的數據結構。 通過對本書的學習,讀者能夠抽象地思考不同數據結構的功能,了解它們之間的相關性,掌握在計算機工程中使用這些數據結構的能力。 本書概念清楚,邏輯性強,內容新穎,可作為高等院校計算機軟件專業與計算機應用專業學生的雙語教材和參考用書,也可供計算機工程技術人員參考。
通過重點考慮抽象思考及問題的求解,本書提供了對數據結構及算法的實際介紹。暢銷書作教授Mark Allen Weiss獨辟蹊徑,清晰地分離了數據結構的接口及實現。計稅針在本書的第二部分學習數據結構的接口及運行時間,以及在各種實際例子中如何使用數據結構。在這之后的第四部分中,Weiss教授介紹了數據結構的實現。通過熟悉接口及使用數據結構,讀者將能夠更加抽象地思考各種數據結構的功能以及潛在的功效。
Mark Allen Weiss 的普林斯頓大學獲得計算機科學博士學位現任佛羅里達國際大學計算機科學學院教授。他在研究的內容包括數據結構、算法及教育,因他的數據結構教科書而聞名。本書受到高度稱贊,并被世界各地的上百所大學所彩。他現任高級計算機科學發展委員會主席。
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