Question: Question 1 ( 1 point ) Given the list ( 1 1 , 2 2 , 2 5 ) , which is the correct way

Question 1(1 point)
Given the list (11,22,25), which is the correct way to add 32 to the list in ascending order?
Question 1 options:
InsertAfter(list,25,32)
InsertAfter(list,32)
Prepend(list,32,25)
Prepend(list,32)
Question 2(1 point)
Given the list (24,36,48), which is the correct way to add 12 at the start of the list?
Question 2 options:
Append(list,12)
Prepend(list,12)
InsertBefore(list,12)
Append(list,0,12)
Question 3(1 point)
Given the list (75,76,68), identify the commands for the following operations.
Insert item 80 at the end of the list
Remove item 68
Insert item 82 at the end of the list
Get the total number of items in the list
Question 3 options:
Append(list,80)Append(list,82)Remove(list,68)GetLength(list)
Append(list,80)Remove(list,68)Append(list,82)GetLength(list)
Append(list,80,82)Remove(list,68)GetList(list)
Append(list,80)Insert(list,82)Remove(list,68)GetItem(list)
Question 4(1 point)
Given the list (40,42,45,46,47), identify the commands for the following operations.
Remove 45
Confirm that 45 is removed
Question 4 options:
Remove(list,45)IsEmpty(list,45)
Delete(list,45)Search(list,45)
Remove(list,45)Search(list,45)
Remove(list,45)Sort(list,45)
Question 5(1 point)
Identify the commands for the following list operations.
Check that there are no items in a list
Insert 10,50,30,40, and 20 at the end of the list
Arrange the items in ascending order
Question 5 options:
IsEmpty(list)Prepend(list,10)Prepend(list,50)Prepend(list,30)Prepend(list,40)Prepend(list,20)Sort(list)
Search(list)Append(list,10)Append(list,50)Append(list,30)Append(list,40)Append(list,20)Sort(list)
IsEmpty(list)Append(list,10)Append(list,50)Append(list,30)Append(list,40)Append(list,20)GetLength(list)
IsEmpty(list)Append(list,10)Append(list,50)Append(list,30)Append(list,40)Append(list,20)Sort(list)
Question 6(1 point)
Identify the correct way to insert 52 at the end of the following list: 12,24,36,48.
Question 6 options:
ListPrepend(list, node 52)
InsertAfter(list, node 52)
ListInsert (tail, node 52)
ListAppend(list, node 52)
Question 7(1 point)
If myList is initially empty, what sequence of operations creates the list (75,76,68)?
Question 7 options:
ListAppend(myList, node 75)ListAppend(myList, node 76)ListAppend(myList, node 68)
ListPrepend(myList, node 75)ListPrepend(myList, node 76)ListPrepend(myList, node 68)
ListPrepend(myList, node 75)ListInsert(myList, node 76)ListInsert(myList, node 68)
ListInsert(myList, node 75)ListAppend(myList, node 76)ListAppend(myList, node 68)
Question 8(1 point)
In a singly-linked list with 1 element, the tail pointer ____ and the next pointer of the head node ____.
Question 8 options:
points to the last node, points to the first node
is null, is null
is null, points to the head node
points to the head node, is null
Question 9(1 point)
In the ListInsertAfter function for singly-linked lists, the curNode parameter points to _____ node.
Question 9 options:
the head
the tail
any existing
the middle
Question 10(1 point)
In the ListInsertAfter function for singly-linked lists, the curNode parameter is ignored when _____.
Question 10 options:
the list's head and tail pointers point to different nodes
the newNode argument is also null
the list has more than 2 items
the list's head pointer is null
Question 11(1 point)
Given the singly-linked list (11,33,44,66), identify the commands for inserting 22 and 55, such that the final list is (11,22,33,44,55,66).
Question 11 options:
ListInsertAfter(list, node 11, node 22)ListInsertAfter(list, node 44, node 55)
ListInsertAfter(list, node 0, node 22)ListInsertAfter(list, node 3, node 55)
ListInsertAfter(list, node 11, node 22, node 55)
ListInsertAfter(list, node 22)ListInsertAfter(list, node 55)
Question 12(1 point)
Given the singly-linked list (88,99), which node will be removed by the ListRemoveAfter(list, node 88) command?
Question 12 options:
The head node
The tail node
No node will be removed.
The list will be removed.
Question 13(1 point)
Identify the correct way to remove 18 from the singly-linked list (18,20,22,24).
Question 13 options:
ListRemoveAfter(list,18)
ListRemoveAfter(list, node 0)
ListRemoveAfter(list, node 18)
ListRemoveAfter(list, null)
Question 14(1 point)
Given the singly-linked list (10,20,30,40,50,60), what commands remove 10,20, and 60, such that the final list is (30,40,50)?
Question 14 options:
ListRemoveAfter(list, null)ListRemoveAfter(list, node 10)ListRemoveAfter(list, node 50)
ListRemoveAfter(list, null)ListRemoveAfter(list, node 20)ListRemoveAfter(list, node 60)
ListRemoveAfter(list, null)ListRemoveAfter(list, null)ListRemoveAfter(list, node 60)
ListRem

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!