Services
Discover
Ask a Question
Log in
Sign up
Filters
Done
Question type:
Essay
Multiple Choice
Short Answer
True False
Matching
Topic
Computing
Study Set
Big Java Binder Early Objects
Exam 16: Basic Data Structures
Path 4
Access For Free
Share
All types
Filters
Study Flashcards
Practice Exam
Learn
Question 81
Multiple Choice
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
Question 82
Multiple Choice
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?
Question 83
Multiple Choice
If we want a create a doubly-linked list data structure so that we can move from a node to the next node as well as to a previous node, we need to add a previous reference to the Node class. Each such DNode (doubly-linked Node) will have a data portion and two DNode references, next and previous. How many references need to be updated when we remove a node from the middle of such a list? Consider the neighboring nodes.
Question 84
Multiple Choice
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?
Question 85
Multiple Choice
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?
Question 86
Multiple Choice
Using the textbook's implementation of a linked list, which of the following statements about changing the data stored in a previously visited element is correct?
Question 87
Multiple Choice
Which of the following actions must be taken to add a node X at the end of a doubly-linked list? I Update the next reference in the node before the position where X will be placed II Update the previous reference in the node before the position where X will be placed III Update the list's last reference
Question 88
Multiple Choice
Adding or removing an arbitrary element in the middle of an array list takes ____ time.
Question 89
Multiple Choice
You have implemented a queue as a singly-linked list, adding elements at the end and removing elements at the front. What is the cost of the add operation?
Question 90
Multiple Choice
Which of the following algorithms would be efficiently executed on a LinkedList?
Question 91
Multiple Choice
Using the textbook's implementation of a linked list, what is the purpose of declaring the Node class to be a static inner class?
Question 92
Multiple Choice
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) ?