Java Software Structures: Designing and Using Data Structures
The second edition of Java Software Structures embraces the enhancements of Java 5.0, where all structures and collections are based on generics. The framework of the text walks the reader through three main areas: conceptualization, explanation, and implementation, allowing for a consistent and coherent introduction to data structures. The addition of integrated case studies provides complete examples to aid readers starting with the problem statement, to design rationale, through full implementation. Readers will learn how to develop high-quality software systems using well-designed collections and algorithms.
Results 1-3 of 29
FIGURE 12.7 A complete tree Inorder Traversal Given the tree shown in Figure
12.7, an inorder traversal would produce the sequence D, B, E, A, C. As defined
earlier, inorder traversal is accomplished by visiting the left child of the node, then
Stated in pseudocode for a binary tree, the algorithm for a postorder traversal is
Traverse ( left child) Traverse (right child) ... 12.7, a level-order traversal would
produce the sequence A, B, C, D, E. As defined earlier, a level-order traversal is ...
Integer» traversal Queue ArrayUnorderedList.<T2 resultList new LinkedOueue-
Integer» (); new ArrayUnordered List.<T2 (); if (! indexIsValid (startIndex)) return
resultList. iterator ( ); boolean [ ] visited = new boolean [numVertices] ; for (int i = 0
What people are saying - Write a review
17 other sections not shown