Resolving collisions by using buckets that are linked chains is called separate
ID: 3843208 • Letter: R
Question
Resolving collisions by using buckets that are linked chains is called separate chaining bucket chaining list resolution joint chaining The most efficient approach to dealing with a gap left in an array after removing an entry from a bag is to replace the entry being removed with the last entry in the array and replace the last entry with null replace the entry being removed with the first entry in the array and replace the first entry with null shift subsequent entries and replace the duplicate reference to the last entry with null replace the entry being removed with null Which of the following is an advantage of using an array to implement the ADT bag? adding an entry to a bag is fast removing a particular entry requires time to locate the entry increasing the size of the array requires time to copy its entries the client has control over the site of the bag Which of these statements about binary search is true? Searching a sorted array is O(n). Searching an unsorted array is O(log n). Searching a sorted linked list is as efficient as searching a sorted array. On each pass half the remaining elements in the list are eliminated The method for removing an item from the front of a queue is called dequeue enqueue getFront none of the above Given a linked list containing the following values: first rightarrow 5 rightarrow 10 rightarrow 15 rightarrow 20 rightarrow null, which of the following best describes what needs to happen when 10 is deleted from the list? The node containing 5 must be changed to point to the node which contains 15. Then the node containing 10 can be deleted.Explanation / Answer
1. separate chaining is the correct answer because separate chaining will return a list of elemnts matching the hash value,the list at the index = the hash value of an element will contain that element.
2. correct option is "a" replace the entery beign removed with the last entery and last entery with the null because the array holds the copy of the reference to the item, not the copy of the item itself.
3. "a" is the correct option adding an entery to a bag as said earlier arrays holds a copy of the reference to the item, not a copy of the item therefore operations like searching, modification, deletion and all become easy because when a method is passed an object or array as a parameter the method gets a copy of the refernce to the object or array, not a copy of the object or array itself.
4.From all of the above statments "d option" is true.
we basically ignore half of the elements just after one compariso.
5. Dequeue is the correct option because dequeue means data can be removed only from the front or the end.
question 6 is not complete in this picture, please upload another picture with all the options.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.