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
(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
Java programming
2022-06-30
Answers
30
Question
40
Followers
30
0
1
206
(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:
Java programming
2022-06-30
Answers
30
Question
40
Followers
30
0
0
308
(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
Java programming
2022-06-30
Answers
30
Question
40
Followers
30
0
1
217
(Add set operations in MyList) Define the following methods in MyList and implement them in MyAbstractList:
Java programming
2022-06-30
Answers
30
Question
40
Followers
30
0
1
210
(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
Java programming
2022-06-29
Answers
30
Question
40
Followers
30
0
0
203
(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
Java programming
2022-06-29
Answers
30
Question
40
Followers
30
0
0
178
(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
Java programming
2022-06-29
Answers
30
Question
40
Followers
30
0
0
170
(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
Java programming
2022-06-29
Answers
30
Question
40
Followers
30
0
0
191
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
Java programming
2022-06-29
Answers
30
Question
40
Followers
30
0
0
184
(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
Java programming
2022-06-29
Answers
30
Question
40
Followers
30
0
0
222
(Execution time for external sorting) Write a program that obtains the execution time of external sorts for integers of size 5,000,000, 10,000,000, 15,000,000, 20,000,000, 25,000,000, and 30,000,000. Your program should print a table like this:
Java programming
2022-06-29
Answers
30
Question
40
Followers
30
0
0
185
(Execution time for sorting) Write a program that obtains the execution time of selection sort, bubble sort, merge sort, quick sort, heap sort, and radix sort for input size 50,000, 100,000, 150,000, 200,000, 250,000, and 300,000
Java programming
2022-06-29
Answers
30
Question
40
Followers
30
0
0
356
(Radix sort) Write a program that randomly generates 1,000,000 integers and sorts them using radix sort
Java programming
2022-06-29
Answers
30
Question
40
Followers
30
0
0
181
Total:
705
Previous
36
37
38
39
40
Next
Go