## Data Structures & Other Objects Using JavaThis book takes a gentle approach to the data structures course in Java. It offers an early, self-contained review of object-oriented programming and Java to give students a firm grasp of key concepts, and allows those experienced in other languages to adjust easily. The book also offers a flexibility which allows professors such options as emphasizing object-oriented programming, covering recursion and sorting early or accelerating the pace of the course. This title meets the needs of professors searching for a book to balance the introduction of object-oriented programming and data structures with Java. |

### From inside the book

Results 1-3 of 13

Page 601

So the Hwsr-case running time for

case time,

won't develop) turns out to be 0(n log n). This is the same as mergesort, and we ...

So the Hwsr-case running time for

**quicksort**is quadratic. Despite a poor worst-case time,

**quicksort**generally is quite good. In fact, the average time (which wewon't develop) turns out to be 0(n log n). This is the same as mergesort, and we ...

Page 602

stopping recursion before the pieces get too small The

Figure 12.5 on page 595 produces its worst- case running time when the array is

already sorted. Suppose you know that the array might already be sorted or

almost ...

stopping recursion before the pieces get too small The

**quicksort**method inFigure 12.5 on page 595 produces its worst- case running time when the array is

already sorted. Suppose you know that the array might already be sorted or

almost ...

Page 614

4.

subarrays that are about half the size of the original array, resulting in 0(n log n)

time. 6. When there is good splitting in

4.

**quicksort**(data, 222, 100); 5. Mergesort always makes recursive calls to sortsubarrays that are about half the size of the original array, resulting in 0(n log n)

time. 6. When there is good splitting in

**quicksort**, the resulting time is 0(n log n).### What people are saying - Write a review

We haven't found any reviews in the usual places.

### Contents

Chapter | 1 |

The Phases of Software Development | 2 |

Abstract Data Types and Java Classes | 35 |

Copyright | |

27 other sections not shown

### Other editions - View all

### Common terms and phrases

Accessor method activated addAl addend algorithm applet arithmetic overflow array ArrayBag B-tree bag's binary search tree binary tree BTNode Celsius clone method collection class components computation constructor copy countOccurrences create current element cursor data type data[i declaration evaluate example Figure hash hash table head reference heap heapsort implements Cloneable Indicates insufficient memory information hiding initial capacity input instance variables IntArrayBag integer IntLinkedBag IntNode iterator Java's Javadoc linked list loop manyItems manyNodes mergesort method returns node null reference number of elements number of operations OutOfMemoryError Indicates insufficient package Parameters parentheses position Postcondition Precondition priority queue private instance variables pseudocode public boolean public class public int public Object public static void public void quicksort recursive call remove return value returns true root Self-Test Exercises sequence shown simulation specification stack step stored string subtree super.clone Suppose target technique Throttle Throws write zero