The Gateway to Computer Science Excellence
For all GATE CSE Questions
Toggle navigation
GATE Overflow
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
First time here? Checkout the
FAQ
!
x
×
Close
Use the google search bar on side panel. It searches through all previous GATE/other questions. For hardcopy of previous year questions please see
here
Recent questions in DS
Recent
Hot!
Most votes
Most answers
Most views
Featured
Previous GATE
Webpage
Arrays,
Stacks,
Queues,
Linked lists,
Trees,
Binary search trees,
Binary heaps,
Graphs.
Recent
Hot!
Most votes
Most answers
Most views
Featured
Previous GATE
0
votes
0
answers
1
Assignment 2.9 (b) page no. 28 from book Classic Data Structures Second Edition by Debasis Samanta
asked
2 days
ago
in
DS
by
mahi.0409
(
7
points)

14
views
datastructure
debasissamanta
0
votes
0
answers
2
Data Structures in C by Sahni  Circular Queue using Dynamic Arrays
I'm learning data structures from a book. In the topic, Circular Queue using Dynamic Array, the author has mentioned below point, Let capacity be the initial capacity of the circular queue,We must first increase the size of ... capacity elements. But how does array doubling and slide to right copy at most 2 * capacity 2 elements??
asked
6 days
ago
in
DS
by
Durga Teja
(
33
points)

25
views
datastructure
queues
0
votes
0
answers
3
# Binary tree
A weight balanced tree is a binary tree in which for each node, the no. of nodes in the left sub tree is atleast half and at most twice the no. of nodes in the right sub tree. The maximum possible height of such a tree with n nodes is best described by which of the following? (a) log2 n (b) log4/3 n (c) log3 n (d) log3/2 n
[closed]
asked
Apr 13
in
DS
by
Golam Murtuza
(
37
points)

19
views
0
votes
0
answers
4
AVL Tree Balancing
here what to do first as FIZZA and IMRAN both are unbalanced than either to do RR rotation from FIZZAIMRANNAVEEN or RL rotation from IMRANNAVEENLOVELY
asked
Apr 13
in
DS
by
kd.....
Junior
(
883
points)

22
views
avltree
datastructure
tree
bst
algorithms
0
votes
0
answers
5
Made Easy:Programming &DS
The number of possible ordered trees with 3 nodes A,B,C is ??
asked
Mar 22
in
DS
by
sandeep singh gaur
(
255
points)

46
views
tree
+1
vote
1
answer
6
Self doubt
I have a confusion regarding the array implementation of binary tree ,i.e what are the index locations of the left child of a node whether it is 2i+1 or 2i and same for right child ,can anyone explain?
asked
Mar 17
in
DS
by
Winner
(
227
points)

51
views
datastructure
0
votes
0
answers
7
JNU , DS TREE, INORDER
If inorder traversing a tree results in E A C K F H D B G, the preorder traversal would return (a) FAEKCDBHG (b) FAEKCDHGB (c) EAFKHDCBG (d) FEAKDCHBG
asked
Feb 24
in
DS
by
8676rau
(
11
points)

137
views
0
votes
0
answers
8
DataStructureDeQueue
Suppose a dequeue is stored in a circular array with N memory cells. At which of the following condition is the dequeue is full? (i) LEFT = N and RIGHT = 1 (ii) LEFT = RIGHT + 1 (iii) LEFT = 1 and RIGHT = N (iv) LEFT = RIGHT  1 + N (i) and (iii) (iii) and (iv) (ii) and (iii) (i) and (iv)
asked
Feb 24
in
DS
by
Abhisek Tiwari 4
Active
(
4.4k
points)

74
views
0
votes
0
answers
9
self doubt
somewhere we seen that formula How many binary tree possible without labeled =c(2n,n)/n+1. anybody explain how we get this formula.
asked
Feb 23
in
DS
by
sandeep singh gaur
(
255
points)

45
views
#binary
tree
0
votes
1
answer
10
ARRAY
A Sorted array of n elements contains 0 and 1 to find out majority of 0 and 1.How much time it will take??? and please explain Meaning majority of 0 and 1??
asked
Feb 19
in
DS
by
sandeep singh gaur
(
255
points)

68
views
#array
0
votes
1
answer
11
MCA ARRAY ADDRESS CALCULATION
Find the address of the position [10, 11, 12] of array A in column major order? Given Dimension is A[1:10, 5:15, 10:15], w is two word count, and Base address is 200.
asked
Feb 17
in
DS
by
SKR1997
(
7
points)

63
views
0
votes
3
answers
12
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
asked
Feb 7
in
DS
by
Arjun
Veteran
(
395k
points)

2k
views
gate2019
datastructure
heap
+4
votes
6
answers
13
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) _________.
asked
Feb 7
in
DS
by
Arjun
Veteran
(
395k
points)

4.4k
views
gate2019
numericalanswers
datastructure
binarytree
+1
vote
1
answer
14
gate 2019
Consider the following statements. (i) In max Heap smallest element is at the leaf node. (ii) In max Heap second largest element always the child of root. (iii) Binary search tree can be constructed from max heap in θ(n). (iv) Max Heap can be build from Binary search tree in θ(n) Which of the above ... ) and (iii) (b) (i), (ii) and (iv) (c) (ii), (iii) and (iv) (d) (i), (iii) and (iv)
asked
Feb 4
in
DS
by
pream sagar
Active
(
2.7k
points)

655
views
0
votes
3
answers
15
ternary tree
In a ternary tree the number of internal nodes of degree 1,2 and 3 is 4,3 and 3 respectively.The number of leaf nodes in the ternary is a)12 b)11 c)9 d)10
asked
Feb 3
in
DS
by
abc1
(
55
points)

286
views
0
votes
0
answers
16
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 _______________
asked
Jan 30
in
DS
by
himgta
Active
(
4k
points)

77
views
algorithms
0
votes
1
answer
17
Made easy tree height
The height of a binary tree is defined as the number of nodes in the longest path from root to the leaf node. Let X be the height of a complete binary tree with 256 nodes. Then the value of X will be Answer 9
asked
Jan 28
in
DS
by
Ram Swaroop
Active
(
2.6k
points)

68
views
datastructure
binarytree
0
votes
0
answers
18
MadeEasy Test Series 2019: Programming & DS  Hashing
Consider the hashing table with 'm' slots and 'n' keys. If the expected number of probes in unsuccessful search is 3. The expected number of probes in a successful search is_ Answer 1.647
asked
Jan 27
in
DS
by
Ram Swaroop
Active
(
2.6k
points)

121
views
programminginc
datastructure
hashing
madeeasytestseries2019
madeeasytestseries
+1
vote
0
answers
19
made easy test
The number of permutations can be obtained in the output using stack assuming that input contains elements 1, 2, 3, 4, 5, 6 in any order such that 3 will poped out from stack at 3rd position are _______ (assume one element enter in stack only one time).
asked
Jan 26
in
DS
by
pream sagar
Active
(
2.7k
points)

148
views
0
votes
0
answers
20
Quora
In a directed graph, a path is called special if every subpath of the path is shortest path. Subpath of a path P means every path in the path P, except P. A. Every shortest path is special B. Every special path is shortest
asked
Jan 25
in
DS
by
Cpt.Nemo143
(
47
points)

25
views
0
votes
0
answers
21
Binary Tree
I think its answer is 8 .Please ,can any one make it sure for me :)
asked
Jan 25
in
DS
by
Nandkishor3939
Active
(
1.2k
points)

66
views
datastructure
binarytree
0
votes
0
answers
22
Number of sub graphs possible
Number of labelled subgraphs possible for the graph given below______________
asked
Jan 25
in
DS
by
Nandkishor3939
Active
(
1.2k
points)

77
views
graphtheory
datastructure
0
votes
0
answers
23
Gate cs 2017
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, ... node to front. We dont need to do this. So why B is the correct answer?D should be correct ? please explain.
asked
Jan 22
in
DS
by
sadiashafaque
(
37
points)

21
views
#g
usergate2017
usermod
#queue
+1
vote
0
answers
24
GATEBOOK2019 Mock Test113
A $kary$ tree is a tree in which every node has at most $k$ children. In a $kary$ tree with $n$ nodes and height $h,$ which of the following is an upper bound for the maximum number of leaves as a function of $h, k,$ and $n?$ $\log_{k}n$ $\log_{k}h$ $\frac{n}{\log_{k}n}$ $k^{h}$
asked
Jan 19
in
DS
by
GATEBOOK
Boss
(
17.2k
points)

110
views
gb2019mock1
trees
+2
votes
0
answers
25
GATEBOOK2019 Mock Test124
Which of these statements is not true about an AVL tree T containing n nodes? Rotations may be required during key insertion to keep T balanced. The height of T cannot exceed $1.5 * \log_2n$. The number of interior nodes in T cannot exceed the ... of that node's subtree, then T can be used to perform order statistic searches in O(lg n) asymptotic algorithmic complexity.
asked
Jan 19
in
DS
by
GATEBOOK
Boss
(
17.2k
points)

150
views
gb2019mock1
avltree
+1
vote
2
answers
26
GATEBOOK2019 Mock Test128
If the expression $((2 + 3) * 4 + 5 * (6 + 7) * 8) + 9$ is evaluated with $*$ having precedence over $+$, then the value obtained is the same as the value of which of the following prefix expressions? $+ + * + 2 3 4 * * 5 + 6 7 8 9$ $+ * + + 2 3 4 * * 5 + 6 7 8 9$ $* + + 2 3 4 * * 5 + + 6 7 8 9$ $* + + + 2 3 4 * * 5 + 6 7 8 9$
asked
Jan 19
in
DS
by
GATEBOOK
Boss
(
17.2k
points)

147
views
gb2019mock1
stack
prefixnotation
0
votes
1
answer
27
GATEBOOK2019 Mock Test153
Suppose that six keys are inserted into an unbalanced binary search tree in the following order: $4, 6, 3, 8, 2,5$ Which of the following statements is/are TRUE? Finding a key in the resulting tree requires examining $1, 2$ or $3$ nodes. The resulting ... be inserted without adding another level to the tree. I and II only I and III only II and III only I, II, and III
asked
Jan 19
in
DS
by
GATEBOOK
Boss
(
17.2k
points)

75
views
gb2019mock1
binarysearchtree
0
votes
0
answers
28
GATEBOOK2019 Mock Test154
If Tree1 and Tree2 are the trees given below, which traversals of Tree1 and Tree2, respectively, will produce the same sequence of node names? preorder & postorder postorder & inorder postorder & postorder inorder & inorder
asked
Jan 19
in
DS
by
GATEBOOK
Boss
(
17.2k
points)

63
views
gb2019mock1
treetraversal
0
votes
0
answers
29
Madeeasy
Consider a procedure find ( ) which take array of n integers as input and produce pair of elements of array whose difference is not greater than the difference of any other pair of element of that array. Which of the following represent worst case time ... difference. Also do elements in pair need to be adjutant to each other? It will really helpful if explained with small example
asked
Jan 17
in
DS
by
mehul vaidya
Active
(
4.3k
points)

30
views
0
votes
0
answers
30
Please solve this Q
asked
Jan 17
in
DS
by
kallu singh
Active
(
1k
points)

38
views
Page:
1
2
3
4
5
6
...
45
next »
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
GATE score validity queries.
How to prepare for IISC Interdisciplinary Mathematical Sciences Interview
GO Hardcopy for GATE 2020
How to prepare for BARC interview
IIIT H
All categories
General Aptitude
1.6k
Engineering Mathematics
7.5k
Digital Logic
3k
Programming & DS
4.9k
Programming
3.6k
DS
1.3k
Algorithms
4.3k
Theory of Computation
6k
Compiler Design
2.1k
Operating System
4.2k
Databases
4.2k
CO & Architecture
3.5k
Computer Networks
4.2k
Non GATE
1.4k
Others
1.5k
Admissions
588
Exam Queries
568
Tier 1 Placement Questions
23
Job Queries
72
Projects
18
Follow @csegate
Recent questions in DS
Recent Blog Comments
10000 to <2000 is really kind of achievement , my...
THey removed it this year... I did not check it,...
even though i am not going for iiit , can you...
I don't think IIITD requires any codechef...
Will apply for IIITB. IIIT D requires a codechef...
50,085
questions
53,209
answers
184,580
comments
70,435
users