Question
PLEASE ANSWER ALL QUESTIONS Question 1 of 13 When we attempt to delete an item in a list, it is possible that we do not
PLEASE ANSWER ALL QUESTIONS
Question 1 of 13
When we attempt to delete an item in a list, it is possible that we do not find that item in the list, in which case we cannot delete it.
|
Question 2 of 13 Unless we run out of memory, we can always insert in a linked list.
| ||||||||||||||||||||||||||||||||||||||||
Question 3 of 13 In an empty list, head is null
| ||||||||||||||||||||||||||||||||||||||||
Question 4 of 13 When we delete the first node in a list, we always set head to null.
| ||||||||||||||||||||||||||||||||||||||||
Question 5 of 13 When we successfully delete an item from a list, the number of items in a list decreases by 1.
| ||||||||||||||||||||||||||||||||||||||||
Question 6 of 13 Assuming a linked list is properly coded, attempting to delete from an empty list should not result in a NullPointerException
| ||||||||||||||||||||||||||||||||||||||||
Question 7 of 13 1.0 Points Data stored in a linked list must be of the primitive data types.
| ||||||||||||||||||||||||||||||||||||||||
Question 8 of 13 1.0 Points It is good practice to provide an accessor to the head of a linked list.
| ||||||||||||||||||||||||||||||||||||||||
Question 9 of 13 1.0 Points Assuming the number of items is an instance variable of a linked list class, it is good practice to provide a mutator for it.
| ||||||||||||||||||||||||||||||||||||||||
Question 10 of 13 1.0 Points A linked list _________________ .A. Has fixed size B. Can grow and shrink as items are added or deleted C. Can grow but not shrink, i.e., items can be added but not deleted D. Can shrink but not grow, i.e., items can be deleted but not added Reset Selection | ||||||||||||||||||||||||||||||||||||||||
Question 11 of 13 1.0 Points A node (of a linked list) typically has _________________ .A. 2 attributes: data and the location of the next node B. 1 attribute only: data C. 1 attribute only: the location of the next node | ||||||||||||||||||||||||||||||||||||||||
Question 12 of 13 When testing the delete method of a linked list, what scenarios do we want to test? A. Attempt to delete an item not in the list B. Delete the first item in the list C. Delete an item in the middle of a list D. All of the above | ||||||||||||||||||||||||||||||||||||||||
Question 13 of 13 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?A. Insert in an empty list (only) B. Insert in an empty list and a non-empty list C. Insert in a non-empty list( only) D. There is no need to test if we think the method is properly coded Question 1 of 16
|
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started