Discover
Questions library
Collections library
Find online teacher
login
Discover
questions library
Find online teacher
login
Popular searches:
if-else
class-diagram
flowchart
Polymorphism
Home
Questions
Questions
Study lists
Asmaamasry Questions
705 Questions
(Heap clone and equals) Implement the clone and equals method in the Heap class
Java programming
2022-06-29
Answers
30
Question
40
Followers
30
0
1
257
(Heap visualization) Write a program that displays a heap graphically, as shown in Figure 23.10. The program lets you insert and delete an element from the heap
Java programming
2022-06-29
Answers
30
Question
40
Followers
30
0
0
292
(Generic Heap using Comparator) Revise Heap in Listing 23.9, using a generic parameter and a Comparator for comparing objects. Define a new constructor with a Comparator as its argument as follows:
Java programming
2022-06-29
Answers
30
Question
40
Followers
30
0
1
216
(Sort using a heap) Implement the following sort method using a heap
Java programming
2022-06-29
Answers
30
Question
40
Followers
30
0
1
185
(Min-heap) The heap presented in the text is also known as a max-heap, in which each node is greater than or equal to any of its children
Java programming
2022-06-29
Answers
30
Question
40
Followers
30
0
1
201
(Check order) Write the following overloaded methods that check whether an array is ordered in ascending order or descending order. By default, the method checks ascending order. To check descending order, pass false to the ascending argument in the method
Java programming
2022-06-29
Answers
30
Question
40
Followers
30
0
1
252
(Generic heap sort) Write the following two generic methods using heap sort. The first method sorts the elements using the Comparable interface and the second uses the Comparator interface
Java programming
2022-06-29
Answers
30
Question
40
Followers
30
0
1
147
(Improve quick sort) The quick sort algorithm presented in the book selects the first element in the list as the pivot. Revise it by selecting the median among the first, middle, and last elements in the list
Java programming
2022-06-29
Answers
30
Question
40
Followers
30
0
1
236
(Generic quick sort) Write the following two generic methods using quick sort. The first method sorts the elements using the Comparable interface and the second uses the Comparator interface
Java programming
2022-06-29
Answers
30
Question
40
Followers
30
0
1
168
(Generic merge sort) Write the following two generic methods using merge sort. The first method sorts the elements using the Comparable interface and the second uses the Comparator interface
Java programming
2022-06-29
Answers
30
Question
40
Followers
30
0
1
188
(Generic bubble sort) Write the following two generic methods using bubble sort. The first method sorts the elements using the Comparable interface and the second uses the Comparator interface
Java programming
2022-06-29
Answers
30
Question
40
Followers
30
0
1
177
(Game: Sudoku) Revise Programming Exercise 22.21 to display all solutions for the Sudoku game, as shown in Figure 22.17a
Java programming
2022-06-29
Answers
30
Question
40
Followers
30
0
0
156
(Find the smallest number) Write a method that uses the divide-and-conquer approach to find the smallest number in a list
Java programming
2022-06-29
Answers
30
Question
40
Followers
30
0
0
158
Total:
705
Previous
37
38
39
40
41
Next
Go