Exam 14: An Introduction to Data Structures

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

In a circular array of 5 elements, the element after the element at index 4 is the element at index:

(Multiple Choice)
4.9/5
(36)

For a linked list of objects, a delete method that returns an object (the object deleted, if any) throws an exception. Why?

(Essay)
4.9/5
(42)

Two instance variables in the IntegerNode class are an int and an IntegerNode object reference, representing the next node.

(True/False)
4.9/5
(42)

The following code segment is used with the ________ approach. 16 /** enqueue method 17 * @param p Player object to insert 18 */ 19 public void enqueue( Player p )

(Multiple Choice)
4.9/5
(34)

Consider a stack represented by an array of five elements and top, the instance variable representing the index of the top of the stack; when the stack is full, the value of top is __________.

(Short Answer)
4.9/5
(30)

It is good practice to provide an accessor to the head of a linked list.

(True/False)
4.9/5
(35)

Data stored in a linked list must be of the primitive data types.

(True/False)
4.8/5
(39)

Analyze why a mutator method should not be included for the number of items in a list.

(Essay)
4.7/5
(31)

Which of the following is true about both delete( int searchID ) and peek( int searchID )?

(Multiple Choice)
4.8/5
(40)

In a sorted linked list, it is possible that the linked list may not be sorted after a deletion.

(True/False)
4.8/5
(31)

A doubly linked list allows us to go either forward or backward from a given node.

(True/False)
4.8/5
(36)

A linked list:

(Multiple Choice)
4.9/5
(42)

Visiting each node in a list by following the links is called __________.

(Short Answer)
4.9/5
(41)

The isFull and isEmpty methods enable a client program to check if the queue is full or empty before enqueueing or dequeueing a Player.

(True/False)
4.9/5
(41)

A linked list that stores its values in ascending order (or descending order) according to a key value is called a(n) _______-linked list.

(Multiple Choice)
4.8/5
(41)

When we successfully delete an item from a list, the number of items in a list decreases by 1.

(True/False)
4.9/5
(33)

When testing the insert method of a linked list (one that inserts at the beginning of the list), what scenarios do we want to test?

(Multiple Choice)
4.9/5
(30)

When testing the delete method of a linked list, what scenarios do we want to test?

(Multiple Choice)
4.9/5
(39)

In a sorted linked list, we always insert in the middle of the list.

(True/False)
4.8/5
(27)

With a linked list, you should provide which of the following functions?

(Multiple Choice)
4.8/5
(41)
Showing 41 - 60 of 69
close modal

Filters

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