Skip to content
Early access — you're among the first to try PYQLabs. Share feedback
Concept drill

data structures

GATE CSE & IT · Data Structures and Algorithms - Graph Traversal (BFS) · 1990-2026

44
PYQs
93%
keyed
1
elite explanations
20
years appeared

Study anchor

Source-book anchor pending for this concept.

Practice action

Start latest PYQ

PYQs in this concept

All concepts →
2026 PYQ

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 5 arrive one by one, in that or...

easyanswer keyelite explanation
2025 Q13

Consider a binary tree T in which every node has either zero or two children. Let n > 0 be the number of nodes in T. Which ONE of the following is the number of nodes in T that hav...

mediumanswer key
2025 Q20

Consider an unordered list of N distinct integers. What is the minimum number of element comparisons required to find an integer in the list that is NOT the largest in the list?

mediumanswer key
2025 Q21

Consider the following B+ tree with 5 nodes, in which a node can store at most 3 key values. The value 23 is now inserted in the B+ tree. Which of the following options(s) is/are C...

mediumanswer key
2025 Q26

Which of the following statement(s) is/are TRUE for any binary search tree (BST) having n distinct integers?

mediumanswer key
2025 Q35

The height of any rooted tree is defined as the maximum number of edges in the path from the root node to any leaf node. Suppose a Min-Heap T stores 32 keys. The height of T is ___...

mediumanswer key
2025 Q35

Suppose the values 10, -4, 15, 30, 20, 5, 60, 19 are inserted in that order into an initially empty binary search tree. Let T be the resulting binary search tree. The number of edg...

mediumanswer key
2025 Q38

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 structures: P: Unsorted doubly...

mediumanswer key
2025 Q45

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 that all keys are distinct. We wi...

mediumanswer key
2025 Q57

In a B+- tree where each node can hold at most four key values, a root to leaf path consists of the following nodes: A = (49, 77, 83, -), B = (7, 19, 33, 44), C = (20*, 22*, 25*, 2...

hardanswer key
2025 Q62

Let LIST be a datatype for an implementation of linked list defined as follows: typedef struct list { int data; struct list *next; } LIST; Suppose a program has created two linked...

mediumanswer key
2025 Q65

In a double hashing scheme, h₁(k) = k mod 11 and h₂(k) = 1 + (k mod 7) are the auxiliary hash functions. The size m of the hash table is 11. The hash function for the i-th probe in...

mediumanswer key
2024 Q21

In a B+ tree, the requirement of at least half-full (50%) node occupancy is relaxed for which one of the following cases?

mediumanswer key
2024 Q39

You are given a set V of distinct integers. A binary search tree T is created by inserting all elements of V one by one, starting with an empty tree. The tree T follows the convent...

mediumanswer key
2024 Q41

An array [82, 101, 90, 11, 111, 75, 33, 131, 44, 93] is heapified. Which one of the following options represents the first three elements in the heapified array?

mediumanswer key
2024 Q43

Consider a binary min-heap containing 105 distinct elements. Let k be the index (in the underlying array) of the maximum element stored in the heap. The number of possible values o...

mediumanswer key
2024 Q48

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 S2 is empty, as shown below. 4...

mediumanswer key
2024 PYQ

An array $[82, 101, 90, 11, 111, 75, 33, 131, 44, 93]$ is heapified. Which one of the following options represents the first three elements in the heapified array?

mediumanswer keybasic explanation
2023 PYQ

Which one of the following sequences when stored in an array at locations $$A[1],....,A[10]$$ forms a max-heap?

easyanswer keybasic explanation
2023 PYQ

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 and a queue Q, both of which are initially e...

easybasic explanation
2021 PYQ

Consider the following sequence of operations on an empty stack. push(54); push(52); pop(); push(55); push(62); s = pop(); Consider the following sequence of operations on an empty...

easybasic explanation
2017 Q13

A circular queue has been implemented using a singly linked list where each node consists of a value and a single pointer pointing to the next node. We maintain exactly two externa...

mediumanswer key
2017 Q15

The Breadth First Search (BFS) algorithm has been implemented using the queue data structure. Which one of the following is a possible order of visiting the nodes in the graph belo...

mediumanswer key
2017 Q49

In a B+ tree, if the search-key value is 8 bytes long, the block size is 512 bytes and the block pointer size is 2 bytes, then the maximum order of the B+ tree is _________.

mediumanswer key
2015 PYQ

An algorithm performs $${\left( {\log N} \right)^{1/2}}$$ find operations, N insert operations, $${\left( {\log N} \right)^{1/2}}$$ delete operations, and $${\left( {\log N} \right...

hardanswer key
2015 PYQ

Given a hash table $$𝑇$$ with $$25$$ slots that stores $$2000$$ elements, the load factor $$\alpha $$ for $$𝑇$$ is ____________ .

easy
2014 PYQ

Suppose a stack implementation supports an instruction REVERSE, which reverses the order of elements on the stack, in addition to the PUSH and POP instructions. Which one of the fo...

mediumanswer key
2011 PYQ

A max-heap is a heap where the value of each parent is greater than or equal to the value of its children. Which of the following is a max-heap?

easyanswer key
2010 PYQ

Which data structure in a compiler is used for managing information about variables and their attributes?

easyanswer key
2009 PYQ

Consider a binary max-heap implemented using an array. Which one of the following array represents a binary max-heap?

easyanswer key
2007 PYQ

Suppose you are given an implementation of a queue of integers. The operations that can be performed on the queue are: i. isEmpty (Q) — returns true if the queue is empty, false ot...

easyanswer key
2006 PYQ

An implementation of a queue Q, using two stacks S1 and S2, is given below : void insert(Q, X){ push(S1, X); } void delete(Q){ if(stack - empty(S2)) then { if(stack - empty(S1)) th...

mediumanswer keybasic explanation
2006 PYQ

Which of the following sequences of array elements forms a heap?

easyanswer key
2005 PYQ

A program P reads in 500 integers in the range [0, 100] representing the cores of 500 students. It then print the frequency of each score above 50. What would be the best way for P...

easyanswer key
2005 PYQ

An Abstract Data Type (ADT) is

easyanswer key
2004 PYQ

The best data structure to check whether an arithmetic expression has balanced parentheses is a

easyanswer key
2004 PYQ

The elements 32, 15, 20, 30, 12, 25, 16, are inserted one by one in the given order into a max Heap. The resultant max Heap is

easyanswer key
2000 PYQ

Suppose you are given an array s[1..n] and a procedure reverse (s, i, j) which reverse the order of elements in s between positions i and j (both inclusive). What does the followin...

easyanswer keybasic explanation
1997 PYQ

A priority queue Q is used to implement a stack that stores characters. PUSH (C) is implemented INSERT (Q, C, K) where K is an appropriate integer key chosen by the implementation....

easyanswer key
1996 PYQ

Which of the following sequences denotes the post order traversal sequence of the tree of previous question?

easyanswer key
1996 PYQ

Consider the following statements: (i) First-in-first out types of computations are efficiently supported by STACKS. (ii) Implementing LISTS on linked lists is more efficient than...

easyanswer key
1994 PYQ

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

easyanswer key
1994 PYQ

Which of the following permutations can be obtained in the output (in the same order) using a stack assuming that the input is the sequence 1, 2, 3, 4, 5 in that order?

mediumanswer key
1990 PYQ

Match the pairs in the following: List - I (a) Heap construction (b) Constructing hash table witn linear probing (c) AVL Tree construction (d) Digital tree construction List - II (...

mediumanswer key