What happens if you forget to update the next pointer of a node when deleting it in a singly linked list?
A. The node remains in the list
B. The list becomes circular
C. The next node's data is lost
D. The list becomes corrupted
Select an option to see the answer and solution.
Which of the following correctly describes a skip list?
A. A linked list with multiple levels of nodes
B. A circular linked list with skips
C. A doubly linked list with skips
D. A singly linked list with hash pointers
Select an option to see the answer and solution.
How do you efficiently find the kth to last element in a singly linked list?
A. Using a single pointer to traverse the list
B. Using two pointers (k steps apart)
C. Using a stack to store elements
D. Using a binary search
Select an option to see the answer and solution.
Which of the following operations is most efficient in a singly linked list?
A. Deletion from the end
B. Accessing the middle element
C. Insertion at the beginning
D. Deletion from the beginning
Select an option to see the answer and solution.
In a linked list, what is a dummy node typically used for?
A. To simplify insertion and deletion
B. To mark the end of the list
C. To store extra information
D. To create a cycle in the list
Select an option to see the answer and solution.
In the above question would using arrays and swaping of elements in place of xor linked list would have been more efficient?
A. no not all
B. yes arrays would have been better than xor lists
C. both would be same in efficiency
D. can't say
Select an option to see the answer and solution.
What are the disadvantages in implementing buddy system algorithm for free lists?
A. internal fragmentation
B. it takes so much space
C. we no more have the hole lists in order of memory address, so it is difficult to detect if 2 holes remain adjacent in memory and shall be merged into one hole
D. both a and c are correct
Select an option to see the answer and solution.
The self organizing list improves . . . . . . . .
A. average access time
B. insertion
C. deletion
D. binary search
Select an option to see the answer and solution.
Which of the following is true about a triply linked list?
A. Dynamic in nature
B. Allows random access
C. Less memory wastage
D. Reverse traversing is difficult
Select an option to see the answer and solution.
Consider the following pseudocode of insertion in XOR list and write the approximate code snippet of it.
void xor-linked-list insert(struct node **head_ref, int value)
{
node *new_node = new (struct node);
new_node->value = value;
new_node->nodepointerxored = xor (*head_ref, NULL);
if (*head_pointer == NULL)
{
printf("invalid");
}
else
{
let b,c,d are nodes and a is to be inserted at beginning,
a address field must contain NULL xor b and b
address filed must be a xor c.
}
*head_pointer = new_node;
}Options are not available for this question.
Select an option to see the answer and solution.
Which among the following is a typical declaration of an unrolled linked list in C?
Options are not available for this question.
Select an option to see the answer and solution.
Assume there is a free list which contains nodes and is filled with a value if it is already assigned and the value will be the size of requested block else will be 0.
z = startpoint;
while ((z < end) && \\ didn't reach end
(*z <= len)) \\ too small to satisfy request
{
assign this block
}
The above code represents what?
A. code for first fit
B. code for best fit
C. code for worst fit
D. none of the mentioned
Select an option to see the answer and solution.
What does first and last nodes of a xor linked lists contain ? (let address of first and last be A and B)
A. NULL xor A and B xor NULL
B. NULL and NULL
C. A and B
D. NULL xor A and B
Select an option to see the answer and solution.
Which of the following data structure is preferred to have lesser search time when the list size is small?
A. search tree
B. sorted list
C. self organizing list
D. linked list
Select an option to see the answer and solution.
What is xor linked list?
A. uses of bitwise XOR operation to decrease storage requirements for doubly linked lists
B. uses of bitwise XOR operation to decrease storage requirements for linked lists
C. uses of bitwise operations to decrease storage requirements for doubly linked lists
D. just another form of linked list
Select an option to see the answer and solution.
What are implicit and explicit implementations of freelists?
A. garbage collection and new or malloc operators respectively
B. new or malloc and garbage collection respectively
C. implicit implementation is not favored
D. explicit implementation is not favored
Select an option to see the answer and solution.
Which among the following is the time complexity for inserting an element in an unrolled linked list?
A. O(1)
B. O(n)
C. O(log n)
D. O(n2 )
Select an option to see the answer and solution.
Which of the following method performs poorly when elements are accessed in sequential order?
A. count method
B. move to front method
C. transpose meth
D. ordering method
Select an option to see the answer and solution.
Skip lists are similar to which of the following datastructure?
A. stack
B. heap
C. binary search tree
D. balanced binary search tree
Select an option to see the answer and solution.
What technique is used in Transpose method?
A. searched node is swapped with its predecessor
B. node with highest access count is moved to head of the list
C. searched node is swapped with the head of list
D. searched nodes are rearranged based on their proximity to the head node
Select an option to see the answer and solution.