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
1
answer
1
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
1 day
ago
in
DS
by
sandeep singh gaur
(
181
points)

36
views
#array
0
votes
1
answer
2
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
2 days
ago
in
DS
by
SKR1997
(
7
points)

13
views
0
votes
2
answers
3
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
(
384k
points)

1.8k
views
gate2019
datastructure
heap
+2
votes
6
answers
4
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
(
384k
points)

3.7k
views
gate2019
numericalanswers
datastructure
binarytree
+1
vote
1
answer
5
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
(
1.7k
points)

586
views
0
votes
3
answers
6
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
(
45
points)

145
views
0
votes
0
answers
7
test series
asked
Jan 31
in
DS
by
saif
(
427
points)

35
views
0
votes
0
answers
8
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
(
3.6k
points)

69
views
algorithms
0
votes
1
answer
9
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.2k
points)

46
views
datastructure
binarytree
0
votes
0
answers
10
Made easy test series 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.2k
points)

80
views
madeeasytestseries
hashing
probability
datastructure
+1
vote
0
answers
11
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
(
1.7k
points)

140
views
0
votes
0
answers
12
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)

20
views
0
votes
0
answers
13
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)

45
views
datastructure
binarytree
0
votes
0
answers
14
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)

65
views
graphtheory
datastructure
0
votes
0
answers
15
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
(
21
points)

15
views
#g
usergate2017
usermod
#queue
0
votes
0
answers
16
Stack
Q.A stack based CPU executes the instruction.Memory location 500 contains 0x88 and memory location 700 contains 0x37.The stack pointer is at 0x003F. The instructions are as follows: I1:PUSH 500 I2:PUSH 700 I3:ADD I4:POP 600 I5:PUSH 300 Which of ... Memory location 0x40 contain 0x88 after execution instructions c)Memory location 600 contains 0xBF after execution instructions d)Both (a) and (c)
asked
Jan 20
in
DS
by
Badayayash
Junior
(
879
points)

51
views
madeeasytestseries
stack
datastructure
0
votes
1
answer
17
made easy test
The number of labelled subgraphs possible for the graph given below.
asked
Jan 19
in
DS
by
snaily16
(
255
points)

214
views
madeeasytestseries
discretemathematics
graphtheory
+1
vote
0
answers
18
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
(
15.3k
points)

93
views
gb2019mock1
trees
+2
votes
0
answers
19
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
(
15.3k
points)

142
views
gb2019mock1
avltree
+1
vote
2
answers
20
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
(
15.3k
points)

124
views
gb2019mock1
stack
prefixnotation
0
votes
1
answer
21
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
(
15.3k
points)

69
views
gb2019mock1
binarysearchtree
0
votes
0
answers
22
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
(
15.3k
points)

55
views
gb2019mock1
treetraversal
0
votes
0
answers
23
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
(
3k
points)

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

31
views
0
votes
0
answers
25
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}}$
asked
Jan 16
in
DS
by
srestha
Veteran
(
108k
points)

112
views
hashing
datastructure
+2
votes
1
answer
26
How many Binary Search Trees are possible for a labelled nodes?
Let us there are n nodes which are labelled. Then the number of trees possible is given by the Catalan Number i.e $\binom{2n}{n} / (n+1)$ Then the binary search trees possible is just 1?
asked
Jan 16
in
DS
by
sripo
Active
(
1.5k
points)

81
views
algorithms
graphtheory
binarysearchtree
binarysearch
binarytree
trees
datastructure
0
votes
0
answers
27
Testbook.com Test Series
When searching for the key value 50 in a binary search tree, nodes containing the key values 10,15,20,30,60,80,89,90 are traversed, not necessarily in the given order. How many different orders are possible in which these key values can occur on the search path from the root to the node containing the value 50?
asked
Jan 16
in
DS
by
Rishav Chetan
(
41
points)

55
views
binarysearchtree
0
votes
0
answers
28
Finding the minimum element in a Heap
I was going through the heap concept and one question came into my mind what will be the best case time complexity of finding the minimum element in a max heap? Thank you:)
asked
Jan 15
in
DS
by
Nandkishor3939
Active
(
1.2k
points)

120
views
heap
binaryheap
timecomplexity
0
votes
0
answers
29
ME Test
[closed]
asked
Jan 13
in
DS
by
Shadan Karim
Junior
(
979
points)

39
views
0
votes
0
answers
30
MadeEasy test series question
Consider the following keys that are hashed into the hash table in the order given using the hash function H(i) = (3i+5)mod11. 12,44,13,88,23,94,11,39,20,16,5 where to handle the collision chaining is used, after inserting all the above keys in table if 2 new keys inserted into table, what is the probability new items hashed into empty slot?(upto 2 decimal places)
asked
Jan 11
in
DS
by
Ollie
(
379
points)

29
views
madeeasytestseries
hashing
probability
Page:
1
2
3
4
5
6
...
43
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
Official keys are out now.
JEST 2019 MEMORY BASED QUESTION PAPER
Relax... But....
Barc : Arjun Sir
JEST Sample Question
All categories
General Aptitude
1.5k
Engineering Mathematics
7.1k
Digital Logic
2.7k
Programming & DS
4.9k
Programming
3.6k
DS
1.3k
Algorithms
4.2k
Theory of Computation
5.3k
Compiler Design
2.1k
Operating System
4k
Databases
4k
CO & Architecture
3.5k
Computer Networks
4k
Non GATE
1.4k
Others
1.5k
Admissions
556
Exam Queries
553
Tier 1 Placement Questions
23
Job Queries
69
Projects
18
Follow @csegate
Recent questions in DS
Recent Blog Comments
Yeah the Answer for the question no.50 is given...
Only one question that is "no.of NOR gates"...
Hey, I'm new here, but can you explain to me why...
How to challenge the key???
47,904
questions
52,285
answers
182,218
comments
67,720
users