The Gateway to Computer Science Excellence
For all GATE CSE Questions
Toggle navigation
Facebook Login
or
Email or Username
Password
Remember
Login
Register

I forgot my password
Activity
Questions
Unanswered
Tags
Subjects
Users
Ask
Prev
Blogs
New Blog
Exams
Recent questions and answers in DS
+32
votes
5
answers
1
GATE200363, ISRO200925
A data structure is required for storing a set of integers such that each of the following operations can be done in $O(\log n)$ time, where $n$ is the number of elements in the set. Deletion of the smallest element Insertion of an element if ... be used but not a heap Both balanced binary search tree and heap can be used Neither balanced search tree nor heap can be used
answered
20 hours
ago
in
DS
by
JashanArora
Active
(
1.8k
points)

5.4k
views
gate2003
datastructure
easy
isro2009
binarysearchtree
+7
votes
3
answers
2
ISRO201162
The average depth of a binary search tree is $O(n^{0.5})$ $O(n)$ $O(\log n)$ $O(n \log n)$
answered
1 day
ago
in
DS
by
JashanArora
Active
(
1.8k
points)

2.1k
views
isro2011
datastructure
binarysearch
0
votes
2
answers
3
In a 3array tree if internal nodes have exactly 3 children,the number of leaf nodes will be __ ?
answered
3 days
ago
in
DS
by
Annu mor
(
11
points)

388
views
binarytree
trees
graphtheory
algorithms
datastructure
0
votes
3
answers
4
Book: MCQs in Computer Science by TJ williams
A sorting technique that guarantees that records with same primary key in the same order in the sorted list as in the original unsorted list is said to be....
answered
4 days
ago
in
DS
by
HanuamntappaBudihal
(
73
points)

110
views
+28
votes
4
answers
5
GATE199712
Consider a hash table with $n$ buckets, where external (overflow) chaining is used to resolve collisions. The hash function is such that the probability that a key value is hashed to a particular bucket is $\frac{1}{n}$. The hash table is initially empty and ... has occurred in any of the $K$ insertions? What is the probability that the first collision occurs at the $K^{th}$ insertion?
answered
4 days
ago
in
DS
by
Shaik Masthan
Veteran
(
64.6k
points)

2.8k
views
gate1997
datastructure
hashing
probability
normal
+7
votes
3
answers
6
ISRO20139
In an array of $2N$ elements that is both 2ordered and 3ordered, what is the maximum number of positions that an element can be from its position if the array were 1ordered? $1$ $2$ $N/2$ $2N  1$
answered
5 days
ago
in
DS
by
JashanArora
Active
(
1.8k
points)

4.5k
views
isro2013
arrays
+23
votes
7
answers
7
GATE20001.14
Consider the following nested representation of binary trees: $(X \ Y \ Z)$ indicates $Y$ and $Z$ are the left and right subtrees, respectively, of node $X$. Note that $Y$ and $Z$ may be $NULL$, or further nested. Which of the following represents a valid binary tree? $(1 \ 2 \ (4 \ 5 \ 6 \ 7))$ ... $(1 \ (2 \ 3 \ 4) \ (5 \ 6 \ 7))$ $(1 \ (2 \ 3 \ NULL) \ (4 \ 5))$
answered
5 days
ago
in
DS
by
IamDRD
(
87
points)

2.3k
views
gate2000
datastructure
binarytree
easy
+3
votes
5
answers
8
GATE201940
Consider the following statements: The smallest element in a maxheap is always at a leaf node The second largest element in a maxheap is always a child of a root node A maxheap can be constructed from a binary search tree in $\theta(n)$ time A binary search tree can be ... time Which of te above statements are TRUE? I, II and III I, II and IV I, III and IV II, III and IV
answered
6 days
ago
in
DS
by
JashanArora
Active
(
1.8k
points)

2.6k
views
gate2019
datastructure
heap
+2
votes
2
answers
9
MadeEasy Test Series: Algorithms  Heap
Consider M1 and M2 be two complete binary tree which satisfy maxheap property, each of size ‘n’. What is the time complexity to combine both M1 and M2 such that combine tree will be min heap tree? O (n log n) O (n) O (n2) O (n2 log n)
answered
6 days
ago
in
DS
by
rahul_vicky
(
71
points)

335
views
madeeasytestseries
datastructure
heap
timecomplexity
+1
vote
2
answers
10
NIELIT 201854
______ to evaluate an expression without any embedded function calls. Two stacks are required one stack is needed Three stacks are required More than three stacks are required
answered
Nov 18
in
DS
by
HeartBleed
Junior
(
809
points)

59
views
nielit2018
stack
expressionevaluation
+4
votes
1
answer
11
Ternary Tree Traversal
Someone Please Explain this https://gateoverflow.in/2046/gate2014312
answered
Nov 18
in
DS
by
PRK
(
87
points)

497
views
datastructure
+1
vote
2
answers
12
GATE19887ii
Mark the balance factor of each on the tree given on the below figure and state whether it is heightbalanced.
answered
Nov 5
in
DS
by
Akash Papnai
(
471
points)

134
views
gate1988
normal
descriptive
binarytree
+44
votes
7
answers
13
GATE2015231
A Young tableau is a $2D$ array of integers increasing from left to right and from top to bottom. Any unfilled entries are marked with $\infty$, and hence there cannot be any entry to the right of, or below a $\infty$. The following Young tableau consists of ... $1$) to be shifted, to remove $1$ from the given Young tableau is _____.
answered
Nov 4
in
DS
by
Akash Papnai
(
471
points)

3.6k
views
gate20152
databases
arrays
normal
numericalanswers
+33
votes
4
answers
14
GATE201413
Let $G=(V,E)$ be a directed graph where $V$ is the set of vertices and $E$ the set of edges. Then which one of the following graphs has the same strongly connected components as $G$ ? $G_1$ = $(V,E_1)$ where $E_1 = \left\{(u,v) \mid (u,v) \notin E\right\}$ $G_2$ ... $\leq2$ from $u$ to $v$ in $E\}$ $G_4$ = $(V_4,E)$ where $V_4$ is the set of vertices in $G$ which are not isolated
answered
Oct 31
in
DS
by
Utkarsh Pathak
(
405
points)

4.3k
views
gate20141
datastructure
graphs
ambiguous
+6
votes
2
answers
15
GATE199013a
Consider the heightbalanced tree $T_{t}$ with values stored at only the leaf nodes, shown in Fig.4. (i) Show how to merge to the tree, $T_{1}$ elements from tree $T_{2}$ shown in Fig.5 using node D of tree $T_{1}$. (ii) What is the time complexity of ... $T_{1}$ and $T_{2}$ are of height $h_{1}$ and $h_{2}$ respectively, assuming that rotation schemes are given. Give reasons.
answered
Oct 25
in
DS
by
commenter commenter
Active
(
1.2k
points)

731
views
gate1990
descriptive
datastructure
trees
+13
votes
3
answers
16
GATE19871xv
In a circular linked list oraganisation, insertion of a record involves modification of One pointer. Two pointers. Multiple pointers. No pointer.
answered
Oct 22
in
DS
by
techbd123
Active
(
3.1k
points)

2.7k
views
gate1987
datastructure
linkedlists
+34
votes
6
answers
17
GATE2005IT50
In a binary tree, for every node the difference between the number of nodes in the left and right subtrees is at most $2$. If the height of the tree is $h > 0$, then the minimum number of nodes in the tree is $2^{h1}$ $2^{h1} + 1$ $2^h  1$ $2^h$
answered
Oct 19
in
DS
by
Arjun
Veteran
(
424k
points)

3.9k
views
gate2005it
datastructure
binarytree
normal
+14
votes
7
answers
18
Heap..
1)The number of min heap trees are possible with 15 elements such that every leaf node must be greater than all nonleaf nodes of the tree are ________.  2)The number of min heap trees are possible with 15 elements_________________
answered
Oct 19
in
Programming
by
ankitron
(
257
points)

1.1k
views
heap
0
votes
1
answer
19
# iit goa data strructre
5. Assume I have a stack s, a queue q, and a binary search tree t. Initially all of them are empty. Indicate the state of the data structures at line number 7 and at the end. What is the maximum height each of the data structures had during the execution? 1 i $\rightarrow$ 0 ... 0 8 while i <= 9 do 9 t.insert(s.pop()) 10 t.insert(q.get()) 11 i $\rightarrow$ i + 1 12 end
answered
Oct 17
in
DS
by
Spidey_guy
(
121
points)

61
views
queue
stack
+1
vote
2
answers
20
Made Easy Test Series:Binary Trees
Consider the following function height, to which pointer to the root node of a binary tree shown below is passed Note that max(a,b) defined by #define max(a,b) (a>b)?a:b. int height(Node *root) The output of the above code will be _________________
answered
Oct 16
in
DS
by
Shagun Singh
(
299
points)

148
views
madeeasytestseries
binarytree
+19
votes
9
answers
21
GATE2017213
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 external pointers FRONT and REAR pointing to the front node and the rear node of the queue, respectively. Which of ... node points to the front node. (I) only. (II) only. Both (I) and (II). Neither (I) nor (II).
answered
Oct 14
in
DS
by
JashanArora
Active
(
1.8k
points)

8k
views
gate20172
datastructure
queues
0
votes
1
answer
22
AVL tree
How to solve question of the following type without creating a tree for each given option. Which of the following order of elements are inserted into an empty AVL tree so that it is possible to get the above AVL tree. A. 94,71,86,25,98,83,27,90 B 98,94,90,83,86,25,71,27 C. 86,25,98,83,27,90,71,94 D. None of these
answered
Oct 14
in
DS
by
MonikaV
(
115
points)

101
views
avltree
datastructure
tree
+83
votes
14
answers
23
GATE2016240
The number of ways in which the numbers $1, 2, 3, 4, 5, 6, 7$ can be inserted in an empty binary search tree, such that the resulting tree has height $6$, is _________. Note: The height of a tree with a single node is $0$.
answered
Oct 14
in
DS
by
techbd123
Active
(
3.1k
points)

12.5k
views
gate20162
datastructure
binarysearchtree
normal
numericalanswers
+21
votes
4
answers
24
GATE19961.12
Consider the following statements: Firstinfirst out types of computations are efficiently supported by STACKS. Implementing LISTS on linked lists is more efficient than implementing LISTS on an array for almost all the basic LIST operations. Implementing QUEUES on a circular array is more efficient than ... and $(ii)$ are true $(iii)$ and $(iv)$ are true $(ii)$ and $(iv)$ are true
answered
Oct 9
in
DS
by
Ekta07_GATE
(
233
points)

2.7k
views
gate1996
datastructure
easy
queues
stack
linkedlists
+10
votes
7
answers
25
GATE201946
Let $T$ be a full binary tree with $8$ leaves. (A full binary tree has every level full.) Suppose two leaves $a$ and $b$ of $T$ are chosen uniformly and independently at random. The expected value of the distance between $a$ and $b$ in $T$ (ie., the number of edges in the unique path between $a$ and $b$) is (rounded off to $2$ decimal places) _________.
answered
Oct 8
in
DS
by
arjuno
(
81
points)

5.6k
views
gate2019
numericalanswers
datastructure
binarytree
0
votes
1
answer
26
Made easy doubt
Consider the following keys that are hashed into the hash table in the given order using the hash function H(key) = key mod 11. 12, 44, 13, 88, 23, 94, 11, 39, 20, 16, 21 Where hash table using quarditic probing of mod11 to handle the collisions, ... go inside the hash table ________ (value will be a whole number). I can't understand what is "i" is it number of collision?
answered
Oct 5
in
DS
by
tech_beardo
(
205
points)

141
views
+10
votes
5
answers
27
GATE201820
The postorder traversal of a binary tree is $\text{8, 9, 6, 7, 4, 5, 2, 3, 1}$. The inorder traversal of the same tree is ${8, 6, 9, 4, 7, 2, 5, 1, 3}$. The height of a tree is the length of the longest path from the root to any leaf. The height of the binary tree above is _____
answered
Oct 3
in
DS
by
techbd123
Active
(
3.1k
points)

2.3k
views
gate2018
datastructure
binarytree
numericalanswers
+1
vote
1
answer
28
Depth First Search: Finding if The graph is connected
Better Explanation??
answered
Sep 26
in
DS
by
tech_beardo
(
205
points)

49
views
datastructure
dfs
graphalgorithms
+30
votes
10
answers
29
GATE201010
In a binary tree with $n$ nodes, every node has an odd number of descendants. Every node is considered to be its own descendant. What is the number of nodes in the tree that have exactly one child? $0$ $1$ $\frac{(n1)}{2}$ $n1$
answered
Sep 26
in
DS
by
Rahul Bidla
(
169
points)

3.6k
views
gate2010
datastructure
binarytree
normal
+43
votes
9
answers
30
GATE200364
Let S be a stack of size $n \geq1$. Starting with the empty stack, suppose we push the first n natural numbers in sequence, and then perform $n$ pop operations. Assume that Push and Pop operations take $X$ seconds each, and $Y$ seconds elapse between the end of one such stack operation ... from S. The average stacklife of an element of this stack is $n(X+Y)$ $3Y+2X$ $n(X+Y)X$ $Y+2X$
answered
Sep 23
in
DS
by
arjuno
(
81
points)

6.7k
views
gate2003
datastructure
stack
normal
+25
votes
5
answers
31
GATE20052
An Abstract Data Type (ADT) is: same as an abstract class a data type that cannot be instantiated a data type for which only the operations defined on it can be used, but none else all of the above
answered
Sep 22
in
DS
by
Ekta07_GATE
(
233
points)

2.9k
views
gate2005
datastructure
normal
abstractdatatype
0
votes
1
answer
32
ME MOCK 2
We are given a C function, mystery() as follows. void mystery(int m, int n) { while(m<=n) { m++; n; } } Let X be the number of times the comparission inside the while loop ( i.e., m<=n ) is performed, when mystery(127,255) is called. Then the value of X is _______________
answered
Sep 21
in
DS
by
tech_beardo
(
205
points)

92
views
algorithms
+1
vote
1
answer
33
CMI2018B7
A First In First Out queue is a data structure supporting the operation Enque, Deque, Print, Enque(x) adds the item $x$ to the tail of the queue. Deque removes the element at the head of the queue and returns its value. Print prints the head of the ... reverse order. If the queue had $n$ elements to begin with, how many statements would you need to print the queue in reverse order?
answered
Sep 14
in
DS
by
`JEET
Boss
(
13.1k
points)

28
views
cmi2018
datastructure
queues
descriptive
+1
vote
1
answer
34
CMI2018B4
You are given a sorted array of $n$ elements which has been circularly shifted. For example, $\{35,42,5,12,23,26\}$ is a sorted array that has been circularly shifted by $2$ positions. Give an $O(\log n)$ time algorithm to find the largest element in a circularly shifted array. (The number of positions through which it has been shifted is unknown to you.)
answered
Sep 14
in
DS
by
`JEET
Boss
(
13.1k
points)

23
views
cmi2018
datastructure
sortedarray
circularlyshiftedarray
descriptive
+1
vote
1
answer
35
CMI2019A3
Suppose that the figure to the right is a binary search tree. The letters indicate the names of the nodes, not the values that are stored. What is the predecessor node, in terms of value, of the root node $A?$ $D$ $H$ $I$ $M$
answered
Sep 14
in
DS
by
`JEET
Boss
(
13.1k
points)

67
views
cmi2019
datastructure
trees
binarysearchtree
0
votes
1
answer
36
Insertion in Hash table. (M.E.)
The number of different insertion sequences of numbers $\left \{ 7,20,32,50,66,77 \right \}$ on an initially empty hash table H of size $6$ and a hash function $h\left ( k \right )=k\mod6$ with linear probing scheme for collision resolution such that the hash table obtained ... ${\color{Blue} {2}}$ ${\color{Blue} {3}}$. ${\color{Blue} {4}}$ ${\color{Blue} {5}}$
answered
Sep 10
in
DS
by
scholaraniket
(
325
points)

192
views
hashing
datastructure
+4
votes
3
answers
37
Made Easy Test Series: DSHash Table
Consider a hash table with $N$ slots. It is given that the collision resolution technique used in chaining. Assume simple uniform hashing, what is the probability that the last $k$ slots are unfilled after the first $'r'$ insertions? $A)\left ( 1\frac{N}{k} \right )^{r}$ ... $C)\left ( 1+\frac{N}{k} \right )^{r1}$ $D)\left ( 1\frac{k}{N} \right )^{r1}$
answered
Sep 10
in
DS
by
scholaraniket
(
325
points)

140
views
datastructure
madeeasytestseries
hashing
+42
votes
9
answers
38
GATE201053
A hash table of length $10$ uses open addressing with hash function $h(k) = k \: mod \: 10$, and linear probing. After inserting $6$ ... sequences of the key values using the same hash function and linear probing will result in the hash table shown above? $10$ $20$ $30$ $40$
answered
Sep 9
in
DS
by
scholaraniket
(
325
points)

6.4k
views
datastructure
hashing
normal
gate2010
+18
votes
5
answers
39
GATE19941.14
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 $\text{1, 2, 3, 4, 5}$ in that order? $\text{3, 4, 5, 1, 2}$ $\text{3, 4, 5, 2, 1}$ $\text{1, 5, 2, 3, 4}$ $\text{5, 4, 3, 1, 2}$
answered
Sep 9
in
DS
by
SUBRATO KUMAR
(
17
points)

5.7k
views
gate1994
datastructure
stack
normal
+23
votes
3
answers
40
GATE200610
In a binary max heap containing $n$ numbers, the smallest element can be found in time $O(n)$ $O(\log n)$ $O(\log \log n)$ $O(1)$
answered
Aug 27
in
DS
by
JashanArora
Active
(
1.8k
points)

3.4k
views
gate2006
datastructure
heap
easy
To see more, click for all the
questions in this category
.
Quick search syntax
tags
tag:apple
author
user:martin
title
title:apple
content
content:apple
exclude
tag:apple
force match
+apple
views
views:100
score
score:10
answers
answers:2
is accepted
isaccepted:true
is closed
isclosed:true
Recent Posts
Linear Algebra Important Points
GATE 2020
OFFICIAL GATE MOCK TEST RELEASED
IIITH: Winter Research Admissions 2019 (For Spring 2020)
TIFR and JEST exam
All categories
General Aptitude
1.9k
Engineering Mathematics
7.5k
Digital Logic
2.9k
Programming and DS
4.9k
Programming
3.5k
DS
1.3k
Algorithms
4.3k
Theory of Computation
6.2k
Compiler Design
2.1k
Operating System
4.5k
Databases
4.1k
CO and Architecture
3.4k
Computer Networks
4.1k
Non GATE
1.5k
Others
1.5k
Admissions
595
Exam Queries
576
Tier 1 Placement Questions
23
Job Queries
72
Projects
17
Follow @csegate
Recent questions and answers in DS
Recent Blog Comments
i also don't have any pdf, actually, I added the...
i don't have , if you have upload it
@mohan123 Do you have all standard book...
bro can be upload all standard book questions in...
it'll take 34 days but for most purpose you can...
50,648
questions
56,441
answers
195,294
comments
100,083
users