Exam 14: An Introduction to Data Structures

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

Assuming the number of items is an instance variable of a linked list class, it is good practice to provide a mutator for it.

Free
(True/False)
4.8/5
(39)
Correct Answer:
Verified

False

_______ represents the index of the element of the array stack that is at the top of the stack.

Free
(Multiple Choice)
4.7/5
(35)
Correct Answer:
Verified

C

When using an array to represent a queue, we should deal with the array as if it were __________.

Free
(Short Answer)
4.8/5
(33)
Correct Answer:
Verified

circular

setData( int i ) is the best choice for coding the insert method of the Node class to enter the days of the week.

(True/False)
4.7/5
(30)

A recursively defined linked list is made up of:

(Multiple Choice)
4.9/5
(32)

A node of a linked list typically has which of the following?

(Multiple Choice)
4.8/5
(30)

A ____________ is a linear data structure that organizes items in a last in, first out manner.

(Multiple Choice)
4.8/5
(39)

Which of the following is correct regarding the GenericLinkedList class and the PlayerLinkedList class?

(Multiple Choice)
4.9/5
(46)

In a stack represented by a linked list, we pop at the end of the list.

(True/False)
4.9/5
(36)

A Player class encapsulates a player; a(n) ____________ encapsulates a node; and a PlayerLinkedList encapsulates the linked list.

(Short Answer)
4.8/5
(29)

When inserting an element in the middle of a doubly linked list, how many pointers need to be reset?

(Multiple Choice)
4.8/5
(31)

When deleting an element in the middle of a doubly linked list, how many pointers need to be reset?

(Multiple Choice)
4.9/5
(34)

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

(Short Answer)
4.8/5
(34)

When using an identifier, for example T, to represent a class that uses generics, what characters surround that identifier?

(Multiple Choice)
4.7/5
(34)

A tail reference can be used to:

(Multiple Choice)
4.9/5
(36)

Consider a queue represented by a circular array of 10 elements and front and back the two instance variables representing the indexes of the front and the back of the queue, respectively. If the value of front is 0 and the value of back is 9, what can you tell about the queue?

(Multiple Choice)
4.8/5
(40)

What is the return value of the method insert( Player p )?

(Short Answer)
4.9/5
(33)

The number of available elements for the queue in the array will expand over time as we enqueue and dequeue, since enqueueing and dequeueing both advance their indexes toward the end of the array.

(True/False)
4.7/5
(37)

It is good practice to define your own exception class as a subclass of another exception class because your class will inherit the existing functionality of the exception class, which simplifies coding the new class; you need to code only the constructor.

(True/False)
4.8/5
(36)

We cannot use recursion in linked lists.

(True/False)
4.8/5
(36)
Showing 1 - 20 of 69
close modal

Filters

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