Exam 14: An Introduction to Data Structures
Exam 1: Introduction to Programming and the Java Language47 Questions
Exam 2: Programming Building Blocks- Java Basics57 Questions
Exam 3: Object-Oriented Programming, Part 1: Using Classes62 Questions
Exam 4: Introduction to Graphical Applications57 Questions
Exam 5: Flow of Control, Part 1: Selection68 Questions
Exam 6: Flow of Control, Part 2: Looping67 Questions
Exam 7: Object-Oriented Programming, Part 2: User-Defined Classes78 Questions
Exam 8: Single-Dimensional Arrays63 Questions
Exam 9: Multidimensional Arrays and the Arraylist Class62 Questions
Exam 10: Object-Oriented Programming, Part 3: Inheritance, Polymorphism, and Interfaces61 Questions
Exam 11: Exceptions, and Input Output Operations77 Questions
Exam 12: Graphical User Interfaces Using Java FX89 Questions
Exam 13: Recursion59 Questions
Exam 14: An Introduction to Data Structures69 Questions
Exam 15: Running Time Analysis56 Questions
Exam 16: RGB Colors, Decimal Conversion, Java Naming, and Random Number Generation110 Questions
Select questions type
If we know in advance the maximum number of items we will have in a queue, then we can use an array to represent the queue.
(True/False)
4.8/5
(33)
In a linked list representing a queue, what extra instance variable is desirable to have and why?
(Essay)
4.9/5
(44)
Unlike a linked list, an array has a fixed size, so the array could be completely filled with elements of the stack.
(True/False)
4.7/5
(36)
In a stack represented by a linked list, we push at the beginning of the list.
(True/False)
4.7/5
(44)
When we attempt to delete an item from a list but it is not on the list, the method returns void.
(True/False)
4.9/5
(40)
Consider a queue represented by an 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 8 and the value of back is 7, what can you tell about the queue?
(Multiple Choice)
4.8/5
(31)
If we know in advance the maximum number of items we will have in a stack, then we can use an array to represent the stack.
(True/False)
4.9/5
(39)
Assuming a linked list is properly coded, attempting to delete from an empty list should not result in a NullPointerException.
(True/False)
4.8/5
(34)
When we delete the first node in a list, we always set head to null.
(True/False)
4.7/5
(36)
What is the instance variable representing a reference to the first node in the linked-list class called?
(Multiple Choice)
4.9/5
(31)
In a queue represented by a linked list, we delete, or dequeue, based on the value of the item stored in a node.
(True/False)
4.8/5
(45)
In a sorted linked list, we insert in such a way that the list is still sorted after the insertion.
(True/False)
4.8/5
(35)
In a LIFO approach, the push method is used to delete the last item inserted.
(True/False)
4.8/5
(35)
Evaluate what is wrong with the following code, and recommend an alternative code.
while ( current.getData( ) != value && current != null )
(Essay)
4.8/5
(36)
If the linked list is empty, deleting an item in a linked list representing a queue would result in a NullPointerException at run time.
(True/False)
4.8/5
(35)
In a stack represented by a linked list, we delete based on the value of the item stored in a node.
(True/False)
4.8/5
(33)
Showing 21 - 40 of 69
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)