Similar Books


    No books found

Title
Chapter: 22 / Q: 10
Number of prime numbers) Programming Exercise 22.8 stores the prime numbers in a file named PrimeNumbers.dat
Chapter: 22 / Q: 11
(Geometry: Graham’s algorithm for finding a convex hull) Section 22.10.2 introduced Graham’s algorithm for finding a convex hull for a set of points. Assume that the Java’s coordinate system is used for the points. Implement the algorithm using the following method:
Chapter: 22 / Q: 12
Last 100 prime numbers) Programming Exercise 22.8 stores the prime numbers in a file named PrimeNumbers.dat. Write an efficient program that reads the last 100 numbers in the file. (Hint: Don’t read all numbers from the file. Skip all numbers before the last 100 numbers in the file.)
Chapter: 22 / Q: 13
(Geometry: convex hull animation) Programming Exercise 22.11 finds a convex hull for a set of points entered from the console. Write a program that enables the user to add/remove points by clicking the left/right mouse button, and displays a convex hull, as shown in Figure 22.8c
Chapter: 22 / Q: 14
(Execution time for prime numbers) Write a program that obtains the execution time for finding all the prime
Chapter: 22 / Q: 15
(Geometry: non-cross polygon) Write a program that enables the user to add/ remove points by clicking the left/right mouse button, and displays a noncrossed polygon that links all the points, as shown in Figure 22.11a. A polygon is crossed if two or more sides intersect, as shown in Figure 22.11b
Chapter: 22 / Q: 16
(Linear search animation) Write a program that animates the linear search algorithm. Create an array that consists of 20 distinct numbers from 1 to 20 in a random order
Chapter: 22 / Q: 17
(Closest-pair animation) Write a program that enables the user to add/remove points by clicking the left/right mouse button, and displays a line that connects the pair of nearest points, as shown in Figure 22.4
Chapter: 22 / Q: 18
Binary search animation) Write a program that animates the binary search algorithm. Create an array with numbers from 1 to 20 in this order. The array elements are displayed in a histogram, as shown in Figure 22.13
Chapter: 22 / Q: 19
(Largest block) The problem for finding a largest block is described in Programming Exercise 8.35
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