, , , e.a.

Data Structures and Algorithms in Java, 6th Editio n

Paperback Engels 2014 6e druk 9781118771334
Verwachte levertijd ongeveer 16 werkdagen

Samenvatting

The design and analysis of efficient data structures has long been recognized as a key component of the Computer Science curriculum. Goodrich, Tomassia and Goldwasser′s approach to this classic topic is based on the object–oriented paradigm as the framework of choice for the design of data structures. For each ADT presented in the text, the authors provide an associated Java interface. Concrete data structures realizing the ADTs are provided as Java classes implementing the interfaces. The Java code implementing fundamental data structures in this book is organized in a single Java package, net.datastructures. This package forms a coherent library of data structures and algorithms in Java specifically designed for educational purposes in a way that is complimentary with the Java Collections Framework.

Specificaties

ISBN13:9781118771334
Taal:Engels
Bindwijze:paperback
Aantal pagina's:736
Druk:6

Lezersrecensies

Wees de eerste die een lezersrecensie schrijft!

Inhoudsopgave

strong>1 Java Primer 1
<p>1.1 Getting Started 2</p>
<p>1.1.1 Base Types 4</p>
<p>1.2 Classes and Objects 5</p>
<p>1.2.1 Creating and Using Objects 6</p>
<p>1.2.2 Defining a Class 9</p>
<p>1.3 Strings, Wrappers, Arrays, and Enum Types 17</p>
<p>1.4 Expressions 23</p>
<p>1.4.1 Literals 23</p>
<p>1.4.2 Operators 24</p>
<p>1.4.3 Type Conversions 28</p>
<p>1.5 Control Flow 30</p>
<p>1.5.1 The If and Switch Statements 30</p>
<p>1.5.2 Loops 33</p>
<p>1.5.3 Explicit Control–Flow Statements 37</p>
<p>1.6 Simple Input and Output 38</p>
<p>1.7 An Example Program 41</p>
<p>1.8 Packages and Imports 44</p>
<p>1.9 Software Development 46</p>
<p>1.9.1 Design 46</p>
<p>1.9.2 Pseudocode 48</p>
<p>1.9.3 Coding 49</p>
<p>1.9.4 Documentation and Style 50</p>
<p>1.9.5 Testing and Debugging 53</p>
<p>1.10 Exercises 55</p>
<p>2 Object–Oriented Design 59</p>
<p>2.1 Goals, Principles, and Patterns 60</p>
<p>2.1.1 Object–Oriented Design Goals 60</p>
<p>2.1.2 Object–Oriented Design Principles 61</p>
<p>2.1.3 Design Patterns 63</p>
<p>2.2 Inheritance 64</p>
<p>2.2.1 Extending the CreditCard Class 65</p>
<p>2.2.2 Polymorphism and Dynamic Dispatch 68</p>
<p>2.2.3 Inheritance Hierarchies 69</p>
<p>2.3 Interfaces and Abstract Classes 76</p>
<p>2.3.1 Interfaces in Java 76</p>
<p>2.3.2 Multiple Inheritance for Interfaces 79</p>
<p>2.3.3 Abstract Classes 80</p>
<p>2.4 Exceptions 82</p>
<p>2.4.1 Catching Exceptions 82</p>
<p>2.4.2 Throwing Exceptions 85</p>
<p>2.4.3 Java s Exception Hierarchy 86</p>
<p>2.5 Casting and Generics 88</p>
<p>2.5.1 Casting 88</p>
<p>2.5.2 Generics 91</p>
<p>2.6 Nested Classes 96</p>
<p>2.7 Exercises 97</p>
<p>3 Fundamental Data Structures 103</p>
<p>3.1 Using Arrays 104</p>
<p>3.1.1 Storing Game Entries in an Array 104</p>
<p>3.1.2 Sorting an Array 110</p>
<p>3.1.3 java.util Methods for Arrays and Random Numbers 112</p>
<p>3.1.4 Simple Cryptography with Character Arrays 115</p>
<p>3.1.5 Two–Dimensional Arrays and Positional Games 118</p>
<p>3.2 Singly Linked Lists 122</p>
<p>3.2.1 Implementing a Singly Linked List Class 126</p>
<p>3.3 Circularly Linked Lists 128</p>
<p>3.3.1 Round–Robin Scheduling 128</p>
<p>3.3.2 Designing and Implementing a Circularly Linked List 129</p>
<p>3.4 Doubly Linked Lists 132</p>
<p>3.4.1 Implementing a Doubly Linked List Class 135</p>
<p>3.5 Equivalence Testing 138</p>
<p>3.5.1 Equivalence Testing with Arrays 139</p>
<p>3.5.2 Equivalence Testing with Linked Lists 140</p>
<p>3.6 Cloning Data Structures 141</p>
<p>3.6.1 Cloning Arrays 142</p>
<p>3.6.2 Cloning Linked Lists 144</p>
<p>3.7 Exercises 145</p>
<p>4 Algorithm Analysis 149</p>
<p>4.1 Experimental Studies 151</p>
<p>4.1.1 Moving Beyond Experimental Analysis 154</p>
<p>4.2 The Seven Functions Used in This Book 156</p>
<p>4.2.1 Comparing Growth Rates 163</p>
<p>4.3 Asymptotic Analysis 164</p>
<p>4.3.1 The Big–Oh Notation 164</p>
<p>4.3.2 Comparative Analysis 168</p>
<p>4.3.3 Examples of Algorithm Analysis 170</p>
<p>4.4 Simple Justification Techniques 178</p>
<p>4.4.1 By Example 178</p>
<p>4.4.2 The Contra Attack 178</p>
<p>4.4.3 Induction and Loop Invariants 179</p>
<p>4.5 Exercises 182</p>
<p>5 Recursion 189</p>
<p>5.1 Illustrative Examples 191</p>
<p>5.1.1 The Factorial Function 191</p>
<p>5.1.2 Drawing an English Ruler 193</p>
<p>5.1.3 Binary Search 196</p>
<p>5.1.4 File Systems 198</p>
<p>5.2 Analyzing Recursive Algorithms 202</p>
<p>5.3 Further Examples of Recursion 206</p>
<p>5.3.1 Linear Recursion 206</p>
<p>5.3.2 Binary Recursion 211</p>
<p>5.3.3 Multiple Recursion 212</p>
<p>5.4 Designing Recursive Algorithms 214</p>
<p>5.5 Recursion Run Amok 215</p>
<p>5.5.1 Maximum Recursive Depth in Java 218</p>
<p>5.6 Eliminating Tail Recursion 219</p>
<p>5.7 Exercises 221</p>
<p>6 Stacks, Queues, and Deques 225</p>
<p>6.1 Stacks 226</p>
<p>6.1.1 The Stack Abstract Data Type 227</p>
<p>6.1.2 A Simple Array–Based Stack Implementation 230</p>
<p>6.1.3 Implementing a Stack with a Singly Linked List 233</p>
<p>6.1.4 Reversing an Array Using a Stack 234</p>
<p>6.1.5 Matching Parentheses and HTML Tags 235</p>
<p>6.2 Queues 238</p>
<p>6.2.1 The Queue Abstract Data Type 239</p>
<p>6.2.2 Array–Based Queue Implementation 241</p>
<p>6.2.3 Implementing a Queue with a Singly Linked List 245</p>
<p>6.2.4 A Circular Queue 246</p>
<p>6.3 Double–Ended Queues 248</p>
<p>6.3.1 The Deque Abstract Data Type 248</p>
<p>6.3.2 Implementing a Deque 250</p>
<p>6.3.3 Deques in the Java Collections Framework 251</p>
<p>6.4 Exercises 252</p>
<p>7 List and Iterator ADTs 257</p>
<p>7.1 The List ADT 258</p>
<p>7.2 Array Lists 260</p>
<p>7.2.1 Dynamic Arrays 263</p>
<p>7.2.2 Implementing a Dynamic Array 264</p>
<p>7.2.3 Amortized Analysis of Dynamic Arrays 265</p>
<p>7.2.4 Java s StringBuilder class 269</p>
<p>7.3 Positional Lists 270</p>
<p>7.3.1 Positions 272</p>
<p>7.3.2 The Positional List Abstract Data Type 272</p>
<p>7.3.3 Doubly Linked List Implementation 276</p>
<p>7.4 Iterators 282</p>
<p>7.4.1 The Iterable Interface and Java s For–Each Loop 283</p>
<p>7.4.2 Implementing Iterators 284</p>
<p>7.5 The Java Collections Framework 288</p>
<p>7.5.1 List Iterators in Java 289</p>
<p>7.5.2 Comparison to Our Positional List ADT 290</p>
<p>7.5.3 List–Based Algorithms in the Java Collections Framework 291</p>
<p>7.6 Sorting a Positional List 293</p>
<p>7.7 Case Study: Maintaining Access Frequencies 294</p>
<p>7.7.1 Using a Sorted List 294</p>
<p>7.7.2 Using a List with the Move–to–Front Heuristic 297</p>
<p>7.8 Exercises 300</p>
<p>8 Trees 307</p>
<p>8.1 General Trees308</p>
<p>8.1.1 Tree Definitions and Properties 309</p>
<p>8.1.2 The Tree Abstract Data Type 312</p>
<p>8.1.3 Computing Depth and Height 314</p>
<p>8.2 Binary Trees 317</p>
<p>8.2.1 The Binary Tree Abstract Data Type 319</p>
<p>8.2.2 Properties of Binary Trees 321</p>
<p>8.3 Implementing Trees 323</p>
<p>8.3.1 Linked Structure for Binary Trees 323</p>
<p>8.3.2 Array–Based Representation of a Binary Tree 331</p>
<p>8.3.3 Linked Structure for General Trees 333</p>
<p>8.4 Tree Traversal Algorithms 334</p>
<p>8.4.1 Preorder and Postorder Traversals of General Trees 334</p>
<p>8.4.2 Breadth–First Tree Traversal 336</p>
<p>8.4.3 Inorder Traversal of a Binary Tree 337</p>
<p>8.4.4 Implementing Tree Traversals in Java 339</p>
<p>8.4.5 Applications of Tree Traversals 343</p>
<p>8.4.6 Euler Tours 348</p>
<p>8.5 Exercises 350</p>
<p>9 Priority Queues 359</p>
<p>9.1 The Priority Queue Abstract Data Type 360</p>
<p>9.1.1 Priorities 360</p>
<p>9.1.2 The Priority Queue ADT 361</p>
<p>9.2 Implementing a Priority Queue 362</p>
<p>9.2.1 The Entry Composite 362</p>
<p>9.2.2 Comparing Keys with Total Orders 363</p>
<p>9.2.3 The AbstractPriorityQueue Base Class 364</p>
<p>9.2.4 Implementing a Priority Queue with an Unsorted List 366</p>
<p>9.2.5 Implementing a Priority Queue with a Sorted List 368</p>
<p>9.3 Heaps 370</p>
<p>9.3.1 The Heap Data Structure 370</p>
<p>9.3.2 Implementing a Priority Queue with a Heap 372</p>
<p>9.3.3 Analysis of a Heap–Based Priority Queue 379</p>
<p>9.3.4 Bottom–Up Heap Construction 380</p>
<p>9.3.5 Using the java.util.PriorityQueue Class 384</p>
<p>9.4 Sorting with a Priority Queue 385</p>
<p>9.4.1 Selection–Sort and Insertion–Sort 386</p>
<p>9.4.2 Heap–Sort 388</p>
<p>9.5 Adaptable Priority Queues 390</p>
<p>9.5.1 Location–Aware Entries 391</p>
<p>9.5.2 Implementing an Adaptable Priority Queue 392</p>
<p>9.6 Exercises 395</p>
<p>10 Maps, Hash Tables, and Skip Lists 401</p>
<p>10.1 Maps 402</p>
<p>10.1.1 The Map ADT 403</p>
<p>10.1.2 Application: Counting Word Frequencies 405</p>
<p>10.1.3 An AbstractMap Base Class 406</p>
<p>10.1.4 A Simple Unsorted Map Implementation 408</p>
<p>10.2 Hash Tables 410</p>
<p>10.2.1 Hash Functions 411</p>
<p>10.2.2 Collision–Handling Schemes 417</p>
<p>10.2.3 Load Factors, Rehashing, and Efficiency 420</p>
<p>10.2.4 Java Hash Table Implementation 422</p>
<p>10.3 Sorted Maps 428</p>
<p>10.3.1 Sorted Search Tables 429</p>
<p>10.3.2 Two Applications of Sorted Maps 433</p>
<p>10.4 Skip Lists 436</p>
<p>10.4.1 Search and Update Operations in a Skip List 438</p>
<p>10.4.2 Probabilistic Analysis of Skip Lists 442</p>
<p>10.5 Sets, Multisets, and Multimaps 445</p>
<p>10.5.1 The Set ADT 445</p>
<p>10.5.2 The Multiset ADT 447</p>
<p>10.5.3 The Multimap ADT 448</p>
<p>10.6 Exercises 451</p>
<p>11 Search Trees 459</p>
<p>11.1 Binary Search Trees 460</p>
<p>11.1.1 Searching Within a Binary Search Tree 461</p>
<p>11.1.2 Insertions and Deletions 463</p>
<p>11.1.3 Java Implementation 466</p>
<p>11.1.4 Performance of a Binary Search Tree 470</p>
<p>11.2 Balanced Search Trees 472</p>
<p>11.2.1 Java Framework for Balancing Search Trees 475</p>
<p>11.3 AVL Trees 479</p>
<p>11.3.1 Update Operations 481</p>
<p>11.3.2 Java Implementation 486</p>
<p>11.4 Splay Trees 488</p>
<p>11.4.1 Splaying 488</p>
<p>11.4.2 When to Splay 492</p>
<p>11.4.3 Java Implementation 494</p>
<p>11.4.4 Amortized Analysis of Splaying 495</p>
<p>11.5 (2,4) Trees 500</p>
<p>11.5.1 Multiway Search Trees 500</p>
<p>11.5.2 (2,4)–Tree Operations 503</p>
<p>11.6 Red–Black Trees 510</p>
<p>11.6.1 Red–Black Tree Operations 512</p>
<p>11.6.2 Java Implementation 522</p>
<p>11.7 Exercises 525</p>
<p>12 Sorting and Selection 531</p>
<p>12.1 Merge–Sort 532</p>
<p>12.1.1 Divide–and–Conquer 532</p>
<p>12.1.2 Array–Based Implementation of Merge–Sort 537</p>
<p>12.1.3 The Running Time of Merge–Sort 538</p>
<p>12.1.4 Merge–Sort and Recurrence Equations 540</p>
<p>12.1.5 Alternative Implementations of Merge–Sort 541</p>
<p>12.2 Quick–Sort 544</p>
<p>12.2.1 Randomized Quick–Sort 551</p>
<p>12.2.2 Additional Optimizations for Quick–Sort 553</p>
<p>12.3 Studying Sorting through an Algorithmic Lens 556</p>
<p>12.3.1 Lower Bound for Sorting 556</p>
<p>12.3.2 Linear–Time Sorting: Bucket–Sort and Radix–Sort 558</p>
<p>12.4 Comparing Sorting Algorithms 561</p>
<p>12.5 Selection 563</p>
<p>12.5.1 Prune–and–Search 563</p>
<p>12.5.2 Randomized Quick–Select 564</p>
<p>12.5.3 Analyzing Randomized Quick–Select 565</p>
<p>12.6 Exercises 566</p>
<p>13 Text Processing 573</p>
<p>13.1 Abundance of Digitized Text 574</p>
<p>13.1.1 Notations for Character Strings 575</p>
<p>13.2 Pattern–Matching Algorithms 576</p>
<p>13.2.1 Brute Force 576</p>
<p>13.2.2 The Boyer–Moore Algorithm 578</p>
<p>13.2.3 The Knuth–Morris–Pratt Algorithm 582</p>
<p>13.3 Tries 586</p>
<p>13.3.1 Standard Tries 586</p>
<p>13.3.2 Compressed Tries 590</p>
<p>13.3.3 Suffix Tries 592</p>
<p>13.3.4 Search Engine Indexing 594</p>
<p>13.4 Text Compression and the Greedy Method 595</p>
<p>13.4.1 The Huffman Coding Algorithm 596</p>
<p>13.4.2 The Greedy Method 597</p>
<p>13.5 Dynamic Programming 598</p>
<p>13.5.1 Matrix Chain–Product 598</p>
<p>13.5.2 DNA and Text Sequence Alignment 601</p>
<p>13.6 Exercises 605</p>
<p>14 Graph Algorithms 611</p>
<p>14.1 Graphs 612</p>
<p>14.1.1 The Graph ADT 618</p>
<p>14.2 Data Structures for Graphs 619</p>
<p>14.2.1 Edge List Structure 620</p>
<p>14.2.2 Adjacency List Structure 622</p>
<p>14.2.3 Adjacency Map Structure 624</p>
<p>14.2.4 Adjacency Matrix Structure 625</p>
<p>14.2.5 Java Implementation 626</p>
<p>14.3 Graph Traversals 630</p>
<p>14.3.1 Depth–First Search 631</p>
<p>14.3.2 DFS Implementation and Extensions 636</p>
<p>14.3.3 Breadth–First Search 640</p>
<p>14.4 Transitive Closure 643</p>
<p>14.5 Directed Acyclic Graphs 647</p>
<p>14.5.1 Topological Ordering 647</p>
<p>14.6 Shortest Paths 651</p>
<p>14.6.1 Weighted Graphs 651</p>
<p>14.6.2 Dijkstra s Algorithm 653</p>
<p>14.7 Minimum Spanning Trees 662</p>
<p>14.7.1 Prim–Jarn&acute;&yacute;k Algorithm 664</p>
<p>14.7.2 Kruskal s Algorithm 667</p>
<p>14.7.3 Disjoint Partitions and Union–Find Structures 672</p>
<p>14.8 Exercises 677</p>
<p>15 Memory Management and B–Trees 687</p>
<p>15.1 Memory Management 688</p>
<p>15.1.1 Stacks in the Java Virtual Machine 688</p>
<p>15.1.2 Allocating Space in the Memory Heap 691</p>
<p>15.1.3 Garbage Collection 693</p>
<p>15.2 Memory Hierarchies and Caching 695</p>
<p>15.2.1 Memory Systems 695</p>
<p>15.2.2 Caching Strategies 696</p>
<p>15.3 External Searching and B–Trees 701</p>
<p>15.3.1 (a,b) Trees 702</p>
<p>15.3.2 B–Trees 704</p>
<p>15.4 External–Memory Sorting 705</p>
<p>15.4.1 Multiway Merging 706</p>
<p>15.5 Exercises 707</p>
<p>Bibliography 710</p>
<p>Index 714</p>

Managementboek Top 100

Rubrieken

    Personen

      Trefwoorden

        Data Structures and Algorithms in Java, 6th Editio n