First time here? Checkout the
FAQ
!
x
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
Login
Remember
Facebook Login
Register
GATE Overflow
Grant Access
All Activity
Questions
Unanswered
Tags
Categories
Users
Ask a Question
Admin
Lists
Previous
Blogs
New Blog
Exams
Recent
Hot!
Most votes
Most answers
Most views
Featured
Previous GATE
Ask a Question
Webpage
Arrays,
Stacks,
Queues,
Linked lists,
Trees,
Binary search trees,
Binary heaps,
Graphs.

edit
Recent questions in DS
+1
vote
1
answer
1
MADE EASY
asked
Sep 2, 2018
in
DS
by
nag.swarna
(
81
points)
30
views
binarytree
0
votes
1
answer
2
PUSH and POP in Postfix evaluation
A postfix expression P is given with n binary operators. To evaluate the operator using stack, how many PUSH and POP operations are needed? A) PUSH:n, POP:n B)PUSH:2n, POP:2n+1 C)PUSH:2n+1, POP:2n D)PUSH:n, POP:2n
asked
Sep 1, 2018
in
DS
by
Shubham Aggarwal
(
373
points)
34
views
0
votes
1
answer
3
hashing
given keys: 224562,137456,214562 140145,214576,162145 144467,199645,234534 Using the digitextraction method (first, third and fifth digits) and quadratic probing, stores the keys shown above in an array with 19 elements. What is the indexes of bin into which all the records are inserted? hint : digit extraction(1,3,5) for 224562>246 mod 19 = 18 and soon.
asked
Aug 31, 2018
in
DS
by
balaganesh
(
73
points)
16
views
quadratic
probing
hashing
datastructure
0
votes
0
answers
4
#self doubt
1) How many stacks are needed to implement a queue . 2) How many queue are needed to implement a stack.
asked
Aug 30, 2018
in
DS
by
Shubham Aggarwal
(
373
points)
32
views
#queue
+1
vote
0
answers
5
Self Doubt
Are Full and Perfect binary tree same ?
asked
Aug 30, 2018
in
DS
by
vishalshrm539
Active
(
1.7k
points)
28
views
0
votes
2
answers
6
How to solve below ques of hashing ?
I am getting answer as 0.6 My approach if in the next two insertions we require atleast one collision , so if in 2 insertions , we have just one collision then it is 30/50*20/50 , if we have 2 collisions in the next 2 insertions , we get 30/50*30/50 , adding them gives 0.6 . What's wrong in this method ?
asked
Aug 29, 2018
in
DS
by
radha gogia
Loyal
(
7.4k
points)
20
views
probability
0
votes
1
answer
7
Recurrence Relation of BST
Let T (n) be the number of comparisons needed in a binary search of a list of n elements. What is the recurrence relation? Explain. 1) T(n) = T(n/2) + 2 2) T(n) = T(n/2) + 1
asked
Aug 29, 2018
in
DS
by
K ANKITH KUMAR
(
173
points)
20
views
recurrence
relation
binarysearchtree
0
votes
1
answer
8
#self doubt
The minimum number of nodes in an AVL Tree of height 10 is..........
asked
Aug 29, 2018
in
DS
by
Shubham Aggarwal
(
373
points)
25
views
0
votes
0
answers
9
DFSArticulation Point and Bridges
I want to find the articulation point and bridges in the above graph. Further for each vertex $v$ I want to compute $v.low=$min $\left \{ v.d, w.d \right \}$ where $v.d$=discovery time of vertex v $w.d$=discovery time of ... someone help me with the values of v.low ? Because based on v.low I will be further able to solve articulation point and bridge problem.
asked
Aug 28, 2018
in
DS
by
Ayush Upadhyaya
Boss
(
11.8k
points)
22
views
graph
dfs
algorithms
0
votes
0
answers
10
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
asked
Aug 27, 2018
in
DS
by
hrcule
(
261
points)
28
views
avltree
datastructure
tree
0
votes
0
answers
11
made easy test series
[closed]
asked
Aug 27, 2018
in
DS
by
ck
(
347
points)
18
views
0
votes
1
answer
12
made easy test series
best suited for linked list a. heap sort b. quick sort c. merge sort d. none
asked
Aug 26, 2018
in
DS
by
ck
(
347
points)
24
views
0
votes
1
answer
13
Test series
An implementation of a queue Q, using two stacks S1and S2, is given below: The number Push and Pop operation needed is represented by X and Y, then the value of X + Y for following operation are ________.
asked
Aug 23, 2018
in
DS
by
syncronizing
(
355
points)
52
views
programminginc
0
votes
2
answers
14
Testseries
A dary heap is like a binary heap, but instead of two children, nodes have d' children. A dary heap can be represented in a 1dimensional array as follows. The root is kept in A[1], its d children are kept in order in A[2] through A[d + 1] their children are kept in ... 2] through A[d2 + d + 1] and so on. What index does maps the jth child for (1 ≤ j ≤ d) of the ith index node?
asked
Aug 23, 2018
in
DS
by
syncronizing
(
355
points)
52
views
programminginc
0
votes
0
answers
15
back edge and no forward edge
Which does this sentence mean? In BFS of an undirected graph, there are no back edge and no forward edge.
asked
Aug 23, 2018
in
DS
by
syncronizing
(
355
points)
18
views
programminginc
datastructure
bfs
0
votes
0
answers
16
Gate forum test series
asked
Aug 23, 2018
in
DS
by
nag.swarna
(
81
points)
17
views
infixpostfix
0
votes
2
answers
17
Calculating array address
Consider array A[1..100,1..100],in which elements are stored in Z representation. An example of 5x5 such array is shown below: Base address of array = 1000,size of each element is 1 Byte,and stored in row major, then address of A[100][50] ?
asked
Aug 22, 2018
in
DS
by
Na462
Active
(
5.1k
points)
60
views
datastructure
arrays
0
votes
0
answers
18
Pointer Doubt
Suppose in P3 the free statement was not present then P3 will not be creating any problem right because when i return p3 it will return basically what its pointing to which is dynamically allocated memory from heap which will be there even though px doesn't exist ... returned value can be stored in another pointer now Right ?? Right now P3 is the case of Dangling Pointer isn't it ?
asked
Aug 22, 2018
in
DS
by
Na462
Active
(
5.1k
points)
22
views
programminginc
pointers
0
votes
0
answers
19
Output of Following C Program
What will be output ? A. Abnormal Termination. B. Infinite loop C. Output wil be 65536 D. None Ans. D
asked
Aug 22, 2018
in
DS
by
Na462
Active
(
5.1k
points)
37
views
programminginc
programming
output
0
votes
1
answer
20
Link list
Suppose we are deleting a node with data field as x. Which can be present anywhere in the list. Consider following Scenarios : S1 : You're only provided with pointer to the node which needs to be deleted. S2 : You're only provided with the pointer to the starting ... cases for S2. D. Deletion is not possible for certain cases in S2, but deletion is possible in all cases for S1. Ans. C
asked
Aug 22, 2018
in
DS
by
Na462
Active
(
5.1k
points)
29
views
linkedlists
datastructure
+2
votes
1
answer
21
Two dimensional array
Consider a 2 dimensional array A[40...95,40...95] in lower triangular matrix representation. The size of each element of array is 1 Byte.If array is implemented in memory as Row major,with base address as 1000,the address of A[66][50] is ..... Ans. 1361
asked
Aug 22, 2018
in
DS
by
Na462
Active
(
5.1k
points)
66
views
arrays
programminginc
0
votes
1
answer
22
Postfix Expression
Let The value of below expression is A. 6 2 3 +  3 8 2 / + * 3 ^ 3 + and Let the value of below expression is Y: 2 A * 16 + What is value of sqrt(Y) Ans. 16
asked
Aug 22, 2018
in
DS
by
Na462
Active
(
5.1k
points)
46
views
datastructure
infixpostfix
+1
vote
0
answers
23
Breadth first Search
Which of following statement is true ? A. In BFS of UDG there are no back edges and forward edges. B. In BFS of Directed Graph there is no back edge and forward edges. C. In BFS of UDG for each back edge(u,v) we have 0<= v.d <= u.d D. Both b and c. Ans. A
asked
Aug 21, 2018
in
DS
by
Na462
Active
(
5.1k
points)
76
views
bfs
datastructure
graphalgorithms
0
votes
0
answers
24
AVL tree
Consider following statements: S1: Rotation operation in AVL always preserves the Inorder ordering. S2: The median of all elements in AVL tree is always at root or one of its two children. S3: If every node in BST has either 0 or 2 children,then searching is O(logn) S4: In a 3 array tree. If number of internal node is 20 then number of Leaves are 41. True Statements ? Ans: Only S1 and S4
asked
Aug 21, 2018
in
DS
by
Na462
Active
(
5.1k
points)
63
views
avltree
datastructure
tree
bst
+1
vote
0
answers
25
Depth first search
The maximum number of edges possible with UDG of n nodes,when DFS call on any random node in the graph result in stack size of 5. i.e. 5 function calls present in stack simultaneously are ......... Ans. 10
asked
Aug 21, 2018
in
DS
by
Na462
Active
(
5.1k
points)
23
views
dfs
datastructure
graphalgorithms
0
votes
1
answer
26
c programming
what wiill be the output? #include<stdio.h> void main() { int x; int a[] = {1, 2, 3, 4}; int *p = a; for(int i=0; i<=3; i++) { x = *(p+i); printf("%d ",x); } printf("\n"); for(int i=0;i<=3; i++) { x= *(pi); printf("%d ", x); } }
asked
Aug 21, 2018
in
DS
by
Lone Wolf
Junior
(
931
points)
32
views
0
votes
0
answers
27
Heap Data Structure
How traversal in a heap takes place? Consider a min heap , I think we cannot traverse it like a binary tree ......For Example if we have to print all elements of heap Do we need to perform delete operation on root O(1) time then perform Heapify O(lgn) and again perform delete and so on which overall takes O(N) time ? Whether same is for search as well Plz explain...
asked
Aug 20, 2018
in
DS
by
Shiv Gaur
Junior
(
977
points)
32
views
heap
algorithms
timecomplexity
0
votes
0
answers
28
gate 2007
GATE 2007 QUESTION(DOUBT) https://gateoverflow.in/3465/gate2007it32 Guys in this question %c is there in printf.......and ans is 25.....but why the ASCII value of 25 is not printed????? As %c is used here. Kindly help where I am getting wrong??
asked
Aug 19, 2018
in
DS
by
himanshu19
Junior
(
775
points)
19
views
+1
vote
1
answer
29
Binary Search Tree
1) How many ways we can traverse 1,2,3,4 in BST? 2) How many ways we can insert 1,2,3,4 in BST? ______________________________________________________________________ How both are different in calculation of BST?Why they are use different formula?
asked
Aug 18, 2018
in
DS
by
srestha
Veteran
(
94k
points)
47
views
datastructure
binarysearchtree
bst
0
votes
0
answers
30
Heap Sorting
Consider a binary tree, where left and right subtreealready heapified. But we havenot done heapificationfor root yet. Then what is time complexity to convert it in a full heap tree? $A)O(\log n)$ or $o(n)$ $B)\Omega (\log n)$ or $\omega(n)$ $C)\Theta (\log n)$ or $\theta (n)$ $D)\text{None of these}$
asked
Aug 18, 2018
in
DS
by
srestha
Veteran
(
94k
points)
87
views
algorithms
sorting
heap
binaryheap
timecomplexity
Page:
1
2
3
4
5
6
...
36
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
No.of Favorite questions in GO per user
ISRO interview experience
List of useful tables for Gate Computer Science
IOCL interview preparation and experience
IITD interview
Follow @csegate
Gatecse
Recent questions in DS
Recent Blog Comments
@MiNiPanda Thank you !!Sorry I mentioned ur name...
Arjun Sir by creating such an amazing platform of...
@Sagar Yes i do remember sagar. Thanks for your...
Thank you everyone :)
@Arjun Sir Wish you happy teachers day
...