Linear Data Structures
Study notes are awaiting editorial approval. You can still practise the reviewed questions below.
Related previous-year questions
Practise this topic- 2026 · Consider the following code snippet in C language that computes the number of nodes in a non-empty singly linked list pointed to by the pointer variab
- 2026 · Consider a stack $S$ and a queue $Q$. Both of them are initially empty and have the capacity to store ten elements each. The elements 1, 2, 3, 4, and
- 2025 · A meld operation on two instances of a data structure combines them into one single instance of the same data structure. Consider the following data s
- 2025 · Consider a stack data structure into which we can PUSH and POP records. Assume that each record pushed in the stack has a positive integer key and tha
- 2025 · Let LIST be a datatype for an implementation of linked list defined as follows: ```c typedef struct list { int data; struct list *next; } LIST; ```
- 2024 · Let $A$ be an array containing integer values. The distance of $A$ is defined as the minimum number of elements in $A$ that must be replaced with anot
- 2024 · Let S1 and S2 be two stacks. S1 has capacity of 4 elements. S2 has capacity of 2 elements. S1 already has 4 elements: 100, 200, 300, and 400, whereas
- 2023 · Let `SLLdel` be a function that deletes a node in a singly-linked list given a pointer to the node and a pointer to the head of the list. Similarly, l
- 2023 · Consider a sequence $a$ of elements $a_0 = 1, a_1 = 5, a_2 = 7, a_3 = 8, a_4 = 9$, and $a_5 = 2$. The following operations are performed on a stack $S
- 2022 · Consider the problem of reversing a singly linked list. To take an example, given the linked list below, head -> [a] -> [b] -> [c] -> [d] -> [e] -> N
- 2022 · Consider the queues $Q_1$ containing four elements and $Q_2$ containing none (shown as the Initial State in the figure). The only operations allowed o
- 2021 · Consider the following sequence of operations on an empty stack. push(54); push(52); pop(); push(55); push(62); s = pop(); Consider the following sequ