Exam 16: Basic Data Structures

arrow
  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags

What type of access does the use of an iterator provide for the elements of a bucket in a hash table?

(Multiple Choice)
4.8/5
(43)

If the current size of an array list is less than the length of the buffer, adding an element at the end of an array list takes ____ time.

(Multiple Choice)
4.8/5
(31)

Which of the following statements about using iterators with hash tables is NOT correct?

(Multiple Choice)
4.7/5
(33)

In the open addressing technique for handling collisions in a hash table, ____.

(Multiple Choice)
4.8/5
(39)

Which operations from the array list data structure could be used in the implementation of the push and pop operations of a stack data structure? I addLast II addFirst III removeFirst

(Multiple Choice)
4.7/5
(39)

Assume that you have a hash table in which there are an average number of collisions. What is the time required to find an element in this hash table?

(Multiple Choice)
4.9/5
(35)

Suppose we maintain two linked lists of length n in random element order. What would be the big-Oh notation for the creating a third list that includes only elements common to both lists, without sorting the first two lists?

(Multiple Choice)
4.9/5
(36)

Reading or writing an array list element at an arbitrary index takes ____ time.

(Multiple Choice)
4.7/5
(41)

Assume that you have a hash table in which there are few or no collisions. What is the time required to locate an element in this hash table?

(Multiple Choice)
4.8/5
(34)

A stack can be implemented as a sequence of nodes in a linked list or an array list. Which of the following statements about this is correct?

(Multiple Choice)
4.9/5
(46)

Which of the following operations from the array list data structure could be used in the implementation of the push and pop operations of a stack data structure? I addLast II addFirst III removeLast

(Multiple Choice)
4.9/5
(31)

Assume that the linked list implementation includes a reference to the last node as well as to the first node. Which of the following statements about the efficiency of the linked list is correct?

(Multiple Choice)
4.8/5
(40)

Suppose we maintain a linked list of length n in random element order. What would be the big-Oh notation for an algorithm that prints each list element and the number of times it occurs in the list (without sorting the list)?

(Multiple Choice)
5.0/5
(42)

Assume that you have a hash table in which there are few or no collisions. What is the time required to add a new element to this hash table?

(Multiple Choice)
4.7/5
(32)

Which statement about handling collisions in a hash table using the open addressing technique is NOT correct?

(Multiple Choice)
4.9/5
(37)

Assume that you have a hash table in which there are an average number of collisions. What is the time required to remove an element from this hash table?

(Multiple Choice)
4.7/5
(38)

Complete the following code snippet, which is intended to compress a hash code to become a valid array index: Int h = x.hashCode(); If (h < 0) { h = -h; } _______________

(Multiple Choice)
4.9/5
(38)

Array list operations that were studied included adding/removing an element at the end or in the middle, and retrieving the kth element. Which of the following statements about these array list operations is correct?

(Multiple Choice)
4.9/5
(42)

Which hash table method(s) will make use of the equals method? I put II get III contains

(Multiple Choice)
4.8/5
(33)

A doubly-linked list requires that each node maintain two references, one to the next node and one to the previous node. Which of the following statements about a doubly-linked list is NOT correct?

(Multiple Choice)
4.9/5
(40)
Showing 21 - 40 of 94
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)