## Marks 1

Consider the problem of reversing a singly linked list. To take an example, given the linked list below:
the reversed linked list should look like
...

What is the worst case time complexity of inserting n elements into an empty linked list, if the linked list needs to be maintained in sorted order?

$$N$$ items are stored in a sorted doubly linked list. For a $$delete$$ operation, a pointer is provided to the record to be deleted. For a $$decrease...

Let P be a singly linked list, Let Q be the pointer to an intermediate node x in the list.What is the worst-case time complexity of the best known alg...

In the worst case, the number of comparisons needed to search a singly linked list of length n for a given element is

## Marks 2

A queue is implemented using a non-circular singly linked list. The queue has a head pointer and a tail pointer, as shown in the figure. Let $$n$$ den...

The preorder traversal sequence of a binary search tree is 30, 20, 10, 15, 25, 23, 39, 35, 42. Which one of the following is the postorder traversal s...

The following C function takes a simply-linked list as input argument. It modifies the list by moving the last element to the front of the list and re...

The following C function takes a single-linked list of integers as a parameter and rearranges the elements of the list. The function is called with th...

The following C function takes a single-linked list of integers as a parameter and rearranges the elements of the list. The function is called with th...

A circularly linked list is used to represent a Queue. A single variable p is used to access the Queue. To which node should p point such that both th...

Consider the function f defined below.
struct item {
int data;
struct item * next;
};
int f(struct item *p) {
return ((p == N...

Linked lists are not suitable data structures of which one of the following problems?

In a circular linked list organization,insertion of a record involves modification of :