Login
Register
Dark Mode
Brightness
Ambient Glow – Questions list
Register
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Recent questions tagged data-structures
6
6 votes
2
2 answers
179
179 views
GO Classes DPP | GATE CS | Data Structures | Linked List Application
The UNIX editor $\texttt{vi}$ allows searching in both directions, and if the search reaches one end, it wraps around and continues from the other end.If the sequence of ...
GO Classes
179
views
asked
Jul 6
Data Structures
goclasses
goclasses-cs-dpp
goclasses-cs-dpp-day-315
data-structures
goclasses-ds-practice-questions
circular-linked-list
+
–
6
6 votes
3
3 answers
180
180 views
GO Classes DPP | GATE CS | Data Structures | Circular Linked List
A circular linked list has $n$ nodes. A function prints every node exactly once and stops when it reaches the starting node again.What is the running time of printing the...
GO Classes
180
views
asked
Jul 6
Data Structures
goclasses
goclasses-cs-dpp
goclasses-cs-dpp-day-315
data-structures
goclasses-ds-practice-questions
circular-linked-list
+
–
6
6 votes
2
2 answers
203
203 views
GO Classes DPP | GATE CS | Data Structures | Linked List Reverse
A singly linked list contains $n$ nodes. We want to reverse the order of the elements in the linked list by changing links, not by copying all elements into an array.Whic...
GO Classes
203
views
asked
Jul 6
Data Structures
goclasses
goclasses-cs-dpp
goclasses-cs-dpp-day-315
data-structures
goclasses-ds-practice-questions
linked-list
+
–
7
7 votes
2
2 answers
200
200 views
GO Classes DPP | GATE CS | Data Structures | Final Head After Reversal
The following function is supposed to reverse a singly linked list:struct node { int data; struct node *next; }; static void reverse(struct node head_ref) { struct node ...
GO Classes
200
views
asked
Jul 6
Data Structures
goclasses
goclasses-cs-dpp
goclasses-cs-dpp-day-315
data-structures
goclasses-ds-practice-questions
linked-list
+
–
8
8 votes
2
2 answers
202
202 views
GO Classes DPP | GATE CS | Data Structures | Linked List Reverse Implement
Consider the following C-style code fragment for reversing a non-empty singly linked list:curr = front; next = curr->next; prev = NULL; while (curr != NULL) { (*) } front...
GO Classes
202
views
asked
Jul 6
Data Structures
goclasses
goclasses-cs-dpp
goclasses-cs-dpp-day-315
data-structures
goclasses-ds-practice-questions
linked-list
+
–
3
3 votes
3
3 answers
214
214 views
GO Classes DPP | GATE CS | Data Structures | Pointer Tracing
Consider the following singly linked list:$\texttt{'B' - 'A' - 'S' - 'E' - NULL}$The pointer $\texttt{head}$ points to the first node containing $\texttt{'B'}$.What chara...
GO Classes
214
views
asked
Jul 4
Data Structures
goclasses
goclasses-cs-dpp
goclasses-cs-dpp-day-314
data-structures
goclasses-ds-practice-questions
linked-list
+
–
6
6 votes
2
2 answers
217
217 views
GO Classes DPP | GATE CS | Data Structures | Front and Rear Reference
A singly linked list maintains two pointers:struct Node *front; // points to first node struct Node *rear; // points to last nodeWhich operation would be inefficient when...
GO Classes
217
views
asked
Jul 4
Data Structures
goclasses
goclasses-cs-dpp
goclasses-cs-dpp-day-314
data-structures
goclasses-ds-practice-questions
linked-list
+
–
9
9 votes
2
2 answers
235
235 views
GO Classes DPP | GATE CS | Data Structures | Find Middle Node
Consider the problem of finding the middle node in a list $l$ of size $n$, given that $n$ is odd. Count the number of accesses to positions of list $l$ needed to find the...
GO Classes
235
views
asked
Jul 4
Data Structures
goclasses
goclasses-cs-dpp
goclasses-cs-dpp-day-314
data-structures
goclasses-ds-practice-questions
linked-list
+
–
7
7 votes
4
4 answers
225
225 views
GO Classes DPP | GATE CS | Data Structures | Delete Last Node
Consider the following C function intended to delete the last node of a singly linked list:void removeLast(struct Node *head) { struct Node *p = head; struct Node *q = p-...
GO Classes
225
views
asked
Jul 4
Data Structures
goclasses
goclasses-cs-dpp
goclasses-cs-dpp-day-314
data-structures
goclasses-ds-practice-questions
linked-list
+
–
6
6 votes
3
3 answers
220
220 views
GO Classes DPP | GATE CS | Data Structures | Insert at Front
Consider the following structure:struct Node { int data; struct Node *next; };A function should insert a new node containing value $\texttt{x}$ at the beginning of a sing...
GO Classes
220
views
asked
Jul 4
Data Structures
goclasses
goclasses-cs-dpp
goclasses-cs-dpp-day-314
data-structures
goclasses-ds-practice-questions
linked-list
+
–
5
5 votes
2
2 answers
277
277 views
GO Classes DPP | GATE CS | Data Structures | Linked List Traverse
Consider the following singly linked list:$\texttt{12 - 18 - 25 - 31 - 44 - 57 - NULL}$Now, consider the following function:int Size(struct Node *list) { int count = 0; w...
GO Classes
277
views
asked
Jul 3
Data Structures
goclasses
goclasses-cs-dpp
goclasses-cs-dpp-day-313
data-structures
goclasses-ds-practice-questions
linked-list
numerical-answers
+
–
5
5 votes
2
2 answers
236
236 views
GO Classes DPP | GATE CS | Data Structures | Insertion in Linked List
A singly linked list is:$\texttt{5 - 8 - 20 - NULL}$A new node $\texttt{newP}$ contains data $9$. Pointer $\texttt{prevP}$ points to the node containing $8$.The inserti...
GO Classes
236
views
asked
Jul 3
Data Structures
goclasses
goclasses-cs-dpp
goclasses-cs-dpp-day-313
data-structures
goclasses-ds-practice-questions
linked-list
+
–
4
4 votes
2
2 answers
193
193 views
GO Classes DPP | GATE CS | Data Structures | Delete by Value
A singly linked list is:$\texttt{5 - 8 - 20 - 9 - 20 - 7 - NULL}$The function $\texttt{deleteByValue(L, val)}$ removes only the first node whose data is equal to $\texttt...
GO Classes
193
views
asked
Jul 3
Data Structures
goclasses
goclasses-cs-dpp
goclasses-cs-dpp-day-313
data-structures
goclasses-ds-practice-questions
linked-list
+
–
7
7 votes
1
1 answer
341
341 views
GO Classes DPP | GATE CS | Data Structures | Array vs Linked List
A sequence of $n$ elements is implemented in two ways:As a normal array with contiguous memory and no extra empty slot. As a singly linked list with only a $\texttt{head}...
GO Classes
341
views
asked
Jul 3
Data Structures
goclasses
goclasses-cs-dpp
goclasses-cs-dpp-day-313
data-structures
goclasses-ds-practice-questions
array
linked-list
multiple-selects
+
–
6
6 votes
1
1 answer
189
189 views
GO Classes DPP | GATE CS | Data Structures | Linked List Complexity
For a singly linked list storing only the head pointer, which of the following operations can be done in worst-case $O(1)$ time?Access the $i$-th element Modify the $i$-t...
GO Classes
189
views
asked
Jul 3
Data Structures
goclasses
goclasses-cs-dpp
goclasses-cs-dpp-day-313
data-structures
goclasses-ds-practice-questions
linked-list
multiple-selects
+
–
0
0 votes
1
1 answer
76
76 views
GO Classes | IIITH PGEE 2026 | Memory Based | Question: 46
Which of the data structures supports both insertion of unique elements (no duplicates allowed) and deletion of the minimum element in $\mathrm{O}(\log n)$ time complexit...
GO Classes
76
views
asked
May 8
IIITH-PGEE
iiith-pgee2026-cs-memorybased
goclasses
data-structures
one-mark
+
–
1
1 vote
2
2 answers
66
66 views
GO Classes | IIITH PGEE 2026 | Memory Based | Question: 47
How many distinct binary trees can be formed using $3$ unlabelled nodes?
GO Classes
66
views
asked
May 8
IIITH-PGEE
iiith-pgee2026-cs-memorybased
goclasses
data-structures
one-mark
+
–
1
1 vote
1
1 answer
48
48 views
GO Classes | IIITH PGEE 2026 | Memory Based | Question: 48
Given the Post-order and In-order traversals of a binary tree:Post-order: $\{8,6,7,3,4,2,5,1\}$ In-order: $\{8,6,3,7,2,4,1,5\}$ Construct the binary tree and find the hei...
GO Classes
48
views
asked
May 8
IIITH-PGEE
iiith-pgee2026-cs-memorybased
goclasses
data-structures
one-mark
+
–
1
1 vote
1
1 answer
42
42 views
GO Classes | IIITH PGEE 2026 | Memory Based | Question: 56
Consider a binary max-heap implemented using an array. Which one of the following arrays represents a valid binary max-heap?$\{25,12,16,13,10,8,14\}$ $\{25,14,13,16,10,8,...
GO Classes
42
views
asked
May 8
IIITH-PGEE
iiith-pgee2026-cs-memorybased
goclasses
data-structures
one-mark
+
–
2
2 votes
3
3 answers
221
221 views
UGC NET CSE | December 2025 | Part 2 | Question: 37
The inorder and preorder traversal of binary tree are $\mathrm{d}, \mathrm{b}, \mathrm{e}, \mathrm{a}, \mathrm{f}, \mathrm{c}, \mathrm{g}$ and $\mathrm{a}, \mathrm{b}, \m...
Shubham Sharma 2
221
views
asked
Apr 19
Data Structures
ugcnetcse-dec2025
data-structures
binary-tree
tree-traversal
+
–
1
1 vote
1
1 answer
159
159 views
UGC NET CSE | December 2025 | Part 2 | Question: 39
Consider $B^{+}$tree in which the maximum number of keys in a node is $5$. What is the minimum number of keys in any non-root node?$1$$2$$3$$4$
Shubham Sharma 2
159
views
asked
Apr 19
Databases
ugcnetcse-dec2025
b-tree
data-structures
+
–
1
1 vote
1
1 answer
114
114 views
UGC NET CSE | December 2025 | Part 2 | Question: 40
How many number of comparison are required in worst case to find out second smallest element of $n$ elements list?$n+\lceil\log n\rceil-1$$n+\lceil\log n\rceil$$\lceil\lo...
Shubham Sharma 2
114
views
asked
Apr 19
Algorithms
ugcnetcse-dec2025
data-structures
algorithms
analysis
+
–
1
1 vote
1
1 answer
125
125 views
UGC NET CSE | December 2025 | Part 2 | Question: 44
Given below are two statements: one is labelled as Assertion A and the other is labelled as Reason RAssertion A: Depth first search can be used to perform a topological s...
Shubham Sharma 2
125
views
asked
Apr 19
Algorithms
ugcnetcse-dec2025
graph-algorithms
topological-sort
depth-first-search
data-structures
+
–
0
0 votes
0
0 answers
298
298 views
BARC 2026 CS | Memory Based Questions | GO Classes | Question: 2
Consider a hash table with $100$ slots. Collisions are resolved using chaining. Assuming simple uniform hashing, what is the probability that the first $3$ slots are unfi...
GO Classes
298
views
asked
Mar 17
BARC
barc2026-cs-memorybased
goclasses
data-structures
three-marks
+
–
1
1 vote
1
1 answer
265
265 views
BARC 2026 CS | Memory Based Questions | GO Classes | Question: 5
Consider the following function that reverses a singly linked list.Node* reverseList(Node* head) { Node* prev = NULL; Node* current = head; Node* next = NULL;...
GO Classes
265
views
asked
Mar 17
BARC
barc2026-cs-memorybased
goclasses
data-structures
three-marks
+
–
0
0 votes
1
1 answer
265
265 views
BARC 2026 CS | Memory Based Questions | GO Classes | Question: 6
Consider the following function:void f(stack S) { int x ; if (!isEmpty(S)) { x = pop(S); f(S); push(S, x); } }What operation is performed by t...
GO Classes
265
views
asked
Mar 17
BARC
barc2026-cs-memorybased
goclasses
data-structures
three-marks
+
–
1
1 vote
1
1 answer
251
251 views
BARC 2026 CS | Memory Based Questions | GO Classes | Question: 7
Consider inserting the following sequence of keys into an initially empty AVL tree:$$38,53,42,26,33,60,79,21,20$$During the construction of the AVL tree, rotations are pe...
GO Classes
251
views
asked
Mar 17
BARC
barc2026-cs-memorybased
goclasses
data-structures
three-marks
+
–
1
1 vote
1
1 answer
265
265 views
BARC 2026 CS | Memory Based Questions | GO Classes | Question: 8
A queue initially contains the elements (from front to rear):$$1~2~3~4~5~6$$An empty stack is also available. The following operations can be performed:Dequeue an element...
GO Classes
265
views
asked
Mar 17
BARC
barc2026-cs-memorybased
goclasses
data-structures
three-marks
+
–
0
0 votes
1
1 answer
292
292 views
BARC 2026 CS | Memory Based Questions | GO Classes | Question: 9
In the balanced binary search tree in the below figure, how many nodes will become unbalanced when a node with value $97$ is inserted?$1$ $2$ $3$ $4$
GO Classes
292
views
asked
Mar 17
BARC
barc2026-cs-memorybased
goclasses
data-structures
three-marks
+
–
0
0 votes
1
1 answer
262
262 views
BARC 2026 CS | Memory Based Questions | GO Classes | Question: 10
Consider the following function defined on a binary tree:int func(Node* root) { if (root == NULL) { return 0; } int l = func(root->left); int...
GO Classes
262
views
asked
Mar 17
BARC
barc2026-cs-memorybased
goclasses
data-structures
three-marks
+
–
Page:
« prev
1
2
3
4
5
6
7
8
9
...
86
next »