Similar Books


    No books found

Title
Chapter: 29 / Q: 15
(Dynamic graphs) Write a program that lets the users create a weighted graph dynamically. The user can create a vertex by entering its name and location, as shown in Figure 29.27
Chapter: 29 / Q: 16
(Display a dynamic MST) Write a program that lets the user create a weighted graph dynamically
Chapter: 29 / Q: 17
(Weighted graph visualization tool) Develop a GUI program as shown in Figure 29.2, with the following requirements: (1) The radius of each vertex is 20 pixels
Chapter: 29 / Q: 18
(Alternative version of Dijkstra algorithm) An alternative version of the Dijkstra algorithm can be described as follows:
Chapter: 29 / Q: 19
(Find u with smallest cost[u] efficiently) The getShortestPath method finds a u with the smallest cost[u] using a linear search, which takes O(V)
Chapter: 29 / Q: 20
(Test if a vertex u is in T efficiently) Since T is implemented using a list in the getMinimumSpanningTree and getShortestPath methods in Listing 29.2 WeightedGraph.java, testing whether a vertex u is in T by invoking T.contains(u) takes O(n) time
Chapter: 30 / Q: 1
(Revise Listing 30.1) Rewrite Listing 30.1 to display the output in a text area, as shown in Figure 30.30
Chapter: 30 / Q: 2
(Racing cars) Rewrite Programming Exercise 15.29 using a thread to control car racing. Compare the program with Programming Exercise 15.29 by setting the delay time to 10 in both programs. Which one runs the animation faster?
Chapter: 30 / Q: 3
(Raise flags) Rewrite Listing 15.13 using a thread to animate a flag being raised. Compare the program with Listing 15.13 by setting the delay time to 10 in both programs. Which one runs the animation faster?
Chapter: 30 / Q: 4
(Synchronize threads) Write a program that launches 1,000 threads. Each thread adds 1 to a variable sum that initially is 0. Define an Integer wrapper object to hold sum. Run the program with and without synchronization to see its effect
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