# Linked List · Data Structures · GATE CSE

Start Practice## Marks 1

GATE CSE 2022

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
...

GATE CSE 2020

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?

GATE CSE 2016 Set 2

$$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...

GATE CSE 2004

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...

GATE CSE 2002

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

GATE CSE 2018

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...

GATE CSE 2013

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...

GATE CSE 2010

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...

GATE CSE 2008

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...

GATE CSE 2005

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...

GATE CSE 2004

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...

GATE CSE 2003

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

GATE CSE 1994

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

GATE CSE 1987

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