Similar Books


    No books found

Title
Chapter: 23 / Q: 15
(Selection sort animation) Write a program that animates the selection sort algorithm. Create an array that consists of 20 distinct numbers from 1 to 20 in a random order
Chapter: 23 / Q: 16
Bubble sort animation) Write a program that animates the bubble sort algorithm. Create an array that consists of 20 distinct numbers from 1 to 20 in a random order
Chapter: 23 / Q: 17
(Radix sort animation) Write a program that animates the radix sort algorithm. Create an array that consists of 20 random numbers from 0 to 1,000. The array elements are displayed, as shown in Figure 23.21
Chapter: 23 / Q: 18
(Merge animation) Write a program that animates the merge of two sorted lists. Create two arrays, list1 and list2, each of which consists of 8 random numbers from 1 to 999
Chapter: 23 / Q: 19
(Quick sort partition animation) Write a program that animates the partition for a quick sort. The program creates a list that consists of 20 random numbers from 1 to 999
Chapter: 23 / Q: 20
(Modify merge sort) Rewrite the mergeSort method to recursively sort the first half of the array and the second half of the array without creating new temporary arrays, and then merge the two into a temporary array and copy its contents to the original array, as shown in Figure 23.6b
Chapter: 24 / Q: 1
(Add set operations in MyList) Define the following methods in MyList and implement them in MyAbstractList:
Chapter: 24 / Q: 2
(Implement MyLinkedList) The implementations of the methods contains(E e), get(int index), indexOf(E e), lastIndexOf(E e), and set(int index, E e) are omitted in the text. Implement these methods
Chapter: 24 / Q: 3
(Implement a doubly linked list) The MyLinkedList class used in Listing 24.6 is a one-way directional linked list that enables one-way traversal of the list. Modify the Node class to add the new data field name previous to refer to the previous node in the list, as follows:
Chapter: 24 / Q: 4
(Use the GenericStack class) Write a program that displays the first 50 prime numbers in descending order. Use a stack to store the prime numbers
total questions: 772

Questions

772

Views

A PHP Error was encountered

Severity: Warning

Message: Undefined property: stdClass::$TotalViews

Filename: books/book.php

Line Number: 411

Best Answers

299

Points

5