Which of the following statements are true?
i) practical application of XOR linked lists are in environments with limited space requirements, such as embedded devices.
ii)xor lists are not suitable because most garbage collectors will fail to work properly with classes or structures that don't contain literal pointers
iii)in order to calculate the address of the next node you need to remember the address of the previous node
iv)xor lists are much efficient than single, doubly linked lists and arrays
Given 10,8,6,7,9
swap the above numbers such that finally you got 6,7,8,9,10
so now reverse 10
9,7,6,8,10
now reverse 9
8,6,7,9,10
7,6,8,9,10
6,7,8,9,10
at this point 6 is ahead so no more reversing can be done so stop.
To implement above algorithm which datastructure is better and why ?
In . . . . . . . . method, whenever a node is accessed, it might move to the head of the list if its number of accesses becomes greater than the records preceding it.
Consider the following algorithm to insert an element in a triply linked list.
insertelement(data)
{
create a node with given data.
if the linked list is empty
{
_____________
_____________
}
if the given node is less than the head
{
link the nodes through address and adjust the tail
}
if the given node is not less than the head
{
if the given node is equal to the head
{
new node is inserted on top of the head
}
else
{
traverse the linked list to find an element greater than the node and insert in front of the node
}
}
}
Which of the following option is best suited to fill the blank?