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
(setToList) Write the following method that returns an ArrayList from a set
Java programming
2022-07-01
Answers
30
Question
40
Followers
30
0
1
194
(Compare MyHashSet and MyArrayList) MyArrayList is defined in Listing 24.3. Write a program that generates 1000000 random double values between 0 and 999999 and stores them in a MyArrayList and in a MyHashSet
Java programming
2022-07-01
Answers
30
Question
40
Followers
30
0
1
197
(Implement hashCode for string) Write a method that returns a hash code for string using the approach described in Section 27.3.2 with b value 31. The function hea
Java programming
2022-07-01
Answers
30
Question
40
Followers
30
0
1
164
(Animate quadratic probing) Write a program that animates quadratic probing, as shown in Figure 27.5. You can change the initial size of the hash-table in program. Assume the load-factor threshold is 0.7
Java programming
2022-07-01
Answers
30
Question
40
Followers
30
0
0
163
(Animate separate chaining) Write a program that animates MyHashMap, as shown in Figure 27.8. You can change the initial size of the table. Assume the load-factor threshold is 0.75
Java programming
2022-07-01
Answers
30
Question
40
Followers
30
0
0
207
(Animate linear probing) Write a program that animates linear probing, as shown in Figure 27.3. You can change the initial size of the hash-table in the program. Assume the load-factor threshold is 0.75
Java programming
2022-07-01
Answers
30
Question
40
Followers
30
0
0
132
(Implement MyHashSet using MyHashMap) Implement MyHashSet using MyHashMap. Note that you can create entries with (key, key), rather than (key, value)
Java programming
2022-07-01
Answers
30
Question
40
Followers
30
0
1
159
(Modify MyHashMap with duplicate keys) Modify MyHashMap to allow duplicate keys for entries. You need to modify the implementation for the put(key, value) method. Also add a new method named getAll(key) that returns a set of values that match the key in the map
Java programming
2022-07-01
Answers
30
Question
40
Followers
30
0
1
249
(Implement MyMap using open addressing with double hashing) Create a new concrete class that implements MyMap using open addressing with double hashing. For simplicity, use f(key) = key % size as the hash function, where size is the hash-table size. Initially, the hash-table size is 4
Java programming
2022-07-01
Answers
30
Question
40
Followers
30
0
1
266
(Implement MyMap using open addressing with quadratic probing) Create a new concrete class that implements MyMap using open addressing with quadratic probing. For simplicity, use f(key) = key % size as the hash function, where size is the hash-table size
Java programming
2022-07-01
Answers
30
Question
40
Followers
30
0
1
139
Implement MyMap using open addressing with linear probing) Create a new concrete class that implements MyMap using open addressing with linear probing
Java programming
2022-07-01
Answers
30
Question
40
Followers
30
0
1
184
(Test AVLTree) Design and write a complete test program to test if the AVLTree class in Listing 26.4 meets all requirements
Java programming
2022-07-01
Answers
30
Question
40
Followers
30
0
0
123
(The kth smallest element) You can find the kth smallest element in a BST in O(n) time from an inorder iterator. For an AVL tree, you can find it in O(log n) time. To achieve this, add a new data field named size in AVLTreeNode to store the number of nodes in the subtree rooted at this node
Java programming
2022-07-01
Answers
30
Question
40
Followers
30
0
0
320
Total:
705
Previous
32
33
34
35
36
Next
Go