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

I forgot my password
All Activity
Questions
Unanswered
Tags
Subjects
Users
Ask
Previous
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 and answers in DS
0
votes
0
answers
1
multi dimensional array
Let A be a twodimensional array declared as follows: A: array[1..23][1..19] of integer; Assuming that each integer takes one memory location, the array is stored in rowmajor order and the first element of the array is stored at the location. Find out the address of the address of the element A[i][j].
asked
6 hours
ago
in
DS
by
ritus
(
7
points)

6
views
+1
vote
1
answer
2
Binary Search Tree
Number of ways we can insert 5,6,9,10 in the nodes of BST, such that height of BST is either 2 or 3?
answered
14 hours
ago
in
DS
by
Prince Sindhiya
Active
(
1.9k
points)

112
views
datastructure
bst
binarysearchtree
0
votes
0
answers
3
Heap data structure
a)Deletion of smallest element in heap b)Insertion of an element in a heap will take $O(n)$ or $O(logn)$ time?
asked
1 day
ago
in
DS
by
srestha
Veteran
(
91.8k
points)

26
views
heap
timecomplexity
datastructure
+7
votes
4
answers
4
Hashing (Test Series)
Consider an initially empty hash table of length 10. Following set of keys are inserted using open addressing with hash function h(k) = k mod 10 and linear probing. 0 1 91 2 2 3 13 4 24 5 12 6 62 7 77 8 82 9 The number of different insertion sequence of the key values using the given hash function and linear probing will result in the hash table shown in above __________.
answered
2 days
ago
in
DS
by
the_bob
(
37
points)

602
views
hashing
0
votes
0
answers
5
GO 2017 datastructures
https://gateoverflow.in/73066/go2017datastructures124 can anyone explain this question's best answer ?
asked
3 days
ago
in
DS
by
Shivani gaikawad
(
331
points)

23
views
datastructure
0
votes
1
answer
6
Program of Binary Tree
Why not this code not printing 10? (It is just a binary tree with one node i.e. root. And value of root is 10) #include <stdio.h> #include<stdlib.h> struct BinaryTree *root=NULL; struct BinaryTree{ int data; struct BinaryTree *left; struct BinaryTree * ... root=node(data1); return root; } } int main() { insert(root,10); printf("%d",*root); return 0; }
answered
3 days
ago
in
DS
by
vishalbgp
(
15
points)

43
views
datastructure
binarytree
binarysearchtree
+18
votes
9
answers
7
GATE201716
Let $T$ be a binary search tree with $15$ nodes. The minimum and maximum possible heights of $T$ are: Note: The height of a tree with a single node is $0$. $4$ and $15$ respectively. $3$ and $14$ respectively. $4$ and $14$ respectively. $3$ and $15$ respectively.
answered
5 days
ago
in
DS
by
AkDS rajput singh
(
11
points)

3k
views
gate20171
datastructure
binarysearchtree
easy
+18
votes
7
answers
8
GATE201350
The procedure given below is required to find and replace certain characters inside an input character string supplied in array $A$. The characters to be replaced are supplied in array $oldc$, while their respective replacement characters are supplied in array $newc$. Array $A$ ... given above, how many test cases will be able to capture the flaw? Only one Only two Only three All four
answered
Aug 10
in
DS
by
Prateek K
Active
(
1.4k
points)

1.9k
views
gate2013
datastructure
arrays
normal
+40
votes
3
answers
9
GATE20022.12
A weightbalanced tree is a binary tree in which for each node, the number of nodes in the left sub tree is at least half and at most twice the number of nodes in the right sub tree. The maximum possible height (number of nodes on the path from the root to the furthest leaf) ... described by which of the following? $\log_2 n$ $\log_{\frac{4}{3}} n$ $\log_3 n$ $\log_{\frac{3}{2}} n$
answered
Aug 9
in
DS
by
marcusD
(
31
points)

4.1k
views
gate2002
datastructure
binarytree
normal
0
votes
0
answers
10
Hashing
Suppose we used a hash fu action H(n) to hash n distinct elements (key) into an array T of length m. What is expected number of collision, if simple uniform hashing is used.
asked
Aug 9
in
DS
by
hrcule
(
251
points)

14
views
hashing
datastructure
uniformhashing
probability
0
votes
1
answer
11
Self doubt
What are the minimum number of pointers required to implement a stack using single ended queue ( the queue is NOT a dequeue )?
answered
Aug 8
in
DS
by
amit srivastava
(
45
points)

53
views
stack
queues
datastructure
pointers
0
votes
1
answer
12
Made easy
https://gateoverflow.in/?qa=blob&qa_blobid=11435838562783483664 Approach for Q9 please . (Please note: it is the last question on left hand side, and part of it is written on right hand side) Answer is d, but according to me it should be b as in 3 situation ... elements but won't be restored in it's original state as mentioned in question. So only 1 and 2 is possible. Is it correct?
answered
Aug 8
in
DS
by
amit srivastava
(
45
points)

47
views
madeeasybooklet
datastructure
queues
0
votes
1
answer
13
Data Structures Resource
Hello everyone. Can anyone suggest me a good book for Data Structures for GATE. Horowitz and Weiss are available in .chm format and its really difficult to read from them. Any other suggestions. Also, I have a good knowledge of C, but i have to formally study it for GATE. Any suggestions for this too?
answered
Aug 8
in
DS
by
BIPLAB DAS
(
83
points)

47
views
datastructure
programminginc
0
votes
1
answer
14
work book
pseudo code of stack declare a stack of characters while (there are more character in the word to read) { read a character push the character on the stack } while(the stack is not empty) { pop a character off the stack write the character to the screen } What is the output of input "192761"?
answered
Aug 8
in
DS
by
arvin
Active
(
3.1k
points)

26
views
stack
0
votes
0
answers
15
work book
Let S be a stack with operations push, pop, top, empty. What is displayed after following segment of code executes . for(i=1; i<=5; i++) s.push(i); while(!s.empty()) printf("%d", s.top()); ans with explanation
asked
Aug 8
in
DS
by
amit166
(
39
points)

42
views
stack
+3
votes
3
answers
16
UGCNETJune2016II23
Suppose you are given a binary tree with n nodes, such that each node has exactly eiter zero or two children. The maximum height of the tree will be $\frac{n}{2}1$ $\frac{n}{2}+1$ $(n1)/2$ $(n+1)/2$
answered
Aug 8
in
DS
by
Ahsanul Hoque
(
199
points)

1.1k
views
ugcnetjune2016ii
datastructure
trees
+1
vote
2
answers
17
GATE CS Mock 2018
Suppose there are two singly linked lists both of which intersect at some point and become a single linked list. The head or start pointers of both the lists are known, but the intersecting node and lengths of lists are not known. What is worst case time complexity of optimal ... n), where m, n are lengths of given lists D) Θ(min(n, m)), where m, n are lengths of given lists
answered
Aug 7
in
DS
by
Prince Singh 1
(
15
points)

130
views
usergate2018
usermod
+3
votes
2
answers
18
Data Structure
Which data structure is most efficient to find the top 10 largest items out of 1 million items stored in file? The answer given is Minheap anybody please explain?
answered
Aug 7
in
DS
by
Prince Sindhiya
Active
(
1.9k
points)

30
views
+1
vote
0
answers
19
Discrete mathematics and its application ,kenneth h rosen ,seventh edition,chapter 8, exercise 8.4 ques 6
asked
Aug 4
in
DS
by
saurab
(
17
points)

21
views
kennethrosen
discretemathematics
graphconnectivity
connected
component
0
votes
1
answer
20
Tree DS
1. How many Binary trees can be made with: (a) 3 unlabelled nodes? (b) 3 labelled nodes? 2. How many Binary Search trees can be made with: (a) 3 unlabelled nodes? (b) 3 labelled nodes? 3. How many AVL trees can be made with: (a) 3 unlabelled nodes? (b) 3 labelled nodes? Can these be generalised for 'n' nodes?
answered
Aug 4
in
DS
by
Shaik Masthan
Boss
(
15.4k
points)

23
views
datastructure
tree
0
votes
1
answer
21
madeeasy
which is an efficient tree structure in terms of space and time complexity? a) AVL Tree b)Full Binary tree c)Complete binary tree d)Binary tree
answered
Aug 4
in
DS
by
Shaik Masthan
Boss
(
15.4k
points)

22
views
datastructure
trees
0
votes
1
answer
22
Hash Function
Which of the following is the least suitable hash function H(x) where X is some non negative integer ? 1. h(k) =k%n 2.h(k) =k*k %n 3.h(k)=(gcd(k+1,2k+2) +k ) %n Linear probing is used for collision resolution .
answered
Aug 4
in
DS
by
Bhagyashree Mukherje
Junior
(
841
points)

49
views
hashing
datastructure
+19
votes
6
answers
23
GATE199819b
Compute the post fix equivalent of the following expression $3^*\log(x+1)\frac{a}{2}$
answered
Aug 4
in
DS
by
Sumita Bose
(
19
points)

2.1k
views
gate1998
stack
infixpostfix
+1
vote
2
answers
24
selfdoubt
Consider a binary tree T that has 50 leaf nodes. Then the number of nodes in T that have exactly ONE children are ______.
answered
Aug 3
in
DS
by
Rishav Kumar Singh
Active
(
1.9k
points)

55
views
binarytree
+2
votes
2
answers
25
self doutbt
How to Construct Full Binary Tree from given preorder and postorder? Thank you.
answered
Aug 3
in
DS
by
Rishav Kumar Singh
Active
(
1.9k
points)

49
views
binarytree
binarysearchtree
treetraversal
0
votes
1
answer
26
Test series zeal
Given an initially empty Binary search tree how many different order of insertion order A,B,C,D,E,F,G that returns minimum height tree?
answered
Aug 2
in
DS
by
adikus1996
(
45
points)

66
views
binarysearchtree
datastructure
zeal
test
series
0
votes
1
answer
27
Made easy
https://gateoverflow.in/?qa=blob&qa_blobid=10936115150698131975
answered
Jul 30
in
DS
by
arvin
Active
(
3.1k
points)

19
views
madeeasytestseries
#ds
#queues
0
votes
1
answer
28
self  doubt
how the get 3n/2 2 comparision
answered
Jul 29
in
DS
by
Shiv Gaur
(
181
points)

77
views
arrays
+15
votes
3
answers
29
GATE201052
A hash table of length $10$ uses open addressing with hash function $h(k) = k \: mod \: 10$, and linear probing. After inserting $6$ values into an empty hash table, the table is shown as below $0$ $1$ $2$ $42$ $3$ $23$ $4$ $34$ $5$ $52$ $6$ $46$ $7$ $33$ $8$ $9$ Which one of the following ... 34, 52, 23, 33$ $34, 42, 23, 52, 33, 46$ $46, 34, 42, 23, 52, 33$ $42, 46, 33, 23, 34, 52$
answered
Jul 28
in
DS
by
mehul vaidya
Active
(
1.5k
points)

1.8k
views
gate2010
datastructure
hashing
normal
0
votes
1
answer
30
GeeksForGeeks Question
If arity of operators is fixed, then which of the following notations can be used to parse expressions without parentheses? a) Infix Notation (Inorder traversal of a expression tree) b) Postfix Notation (Postorder traversal of a expression tree) c) Prefix Notation (Preorder traversal of a expression tree) A b and c B Only b C a, b and c D None of them What arity of operators?
answered
Jul 28
in
DS
by
Verma Ashish
Junior
(
547
points)

42
views
+1
vote
1
answer
31
Modify question gate 2003
A data structure is required for storing a set of integers such that each of the following operations can be done in O(logn) time, where n is the number of elements in the set. Deletion of the smallest element Insertion of an element. Which of the following data ... balance Bst also it should be O(logn) as for balancing it will take O(logn) time . Correct me if i am wrong
answered
Jul 28
in
DS
by
abhishekmehta4u
Boss
(
22.6k
points)

24
views
datastructure
+1
vote
2
answers
32
Made Easy test series DS
The number of binary search trees possible with 12 keys, when keys 1, 2, 3, 4, ........ 12 are inserted into empty Binary Search Tree with condition such that 4 is the root of binary search tree and 8 is immediate right child of 4 are ________.
answered
Jul 27
in
DS
by
Shaik Masthan
Boss
(
15.4k
points)

74
views
0
votes
1
answer
33
Made Easy test series DS
Consider a binary tree where for every node ⏐P – Q⏐ ≤ 2. P represents number of nodes in left sub tree for node S and Q represents the number of nodes in right sub tree for node S for h > 0. The minimum number of nodes present in such binary tree of height h = 4 _________. (Assume root is at height 0)
answered
Jul 27
in
DS
by
abhishekmehta4u
Boss
(
22.6k
points)

45
views
0
votes
0
answers
34
Made Easy test series DS
Consider the following function with a Binary Tree with atleast one node: int path (struct node *x, int len) { if(x==null) return B; else return A; } Assume the above function is used to check the given binary tree has any path with specified length from root to the leaf node . Let ... , B is (len=1) d) A is path(x >left, len)  path(x> right, len), B is (len=1)
asked
Jul 27
in
DS
by
Sambhrant Maurya
Junior
(
609
points)

36
views
0
votes
0
answers
35
Hashing
Keys 9,19,29,39,49,59,69 are inserted into a hash table containing entries from 0 to 9 using hash function H=kmod10 and quadratic probing is used for collision resolution. What is the index into which 59 will be inserted? a)3 b)6 c)8 d)5
asked
Jul 26
in
DS
by
Sambhrant Maurya
Junior
(
609
points)

27
views
0
votes
1
answer
36
Ace Programming and DS
a) Reverse the linked list b)Convert to circular linked list c)Converting a given singly linked list to have alternate nodes of singly linked list d)Converting a given singly linked list to have alternate nodes of circular linked list
answered
Jul 26
in
DS
by
shubham6596
(
163
points)

41
views
0
votes
1
answer
37
Ace Programming and DS
answered
Jul 26
in
DS
by
Bhagyashree Mukherje
Junior
(
841
points)

27
views
+65
votes
5
answers
38
GATE2007IT29
When searching for the key value $60$ in a binary search tree, nodes containing the key values $10, 20, 40, 50, 70, 80, 90$ are traversed, not necessarily in the order given. 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 $60$? $35$ $64$ $128$ $5040$
answered
Jul 26
in
DS
by
Prince Sindhiya
Active
(
1.9k
points)

6.8k
views
gate2007it
datastructure
binarysearchtree
normal
0
votes
1
answer
39
Ace Programming and DS
answered
Jul 26
in
DS
by
Shaik Masthan
Boss
(
15.4k
points)

42
views
0
votes
0
answers
40
Ace Programming and DS
asked
Jul 26
in
DS
by
Sambhrant Maurya
Junior
(
609
points)

34
views
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
Members at the site
rajatmyname
amkrj
awadheshoo7
vijay kumar 2
Vegeta
Chandrabhan Vishwa 1
mehul vaidya
Shubhgupta
Srinivas_Reddy_Kotla
Pradeesh
Bhagyashree Mukherje
Recent Posts
Schedule for GATE 2019
GATE 2019 official website
Correct way of preparation
Right process to start solving MCQs in Comp.Sc.
UGC NET JULY 2018 Results
All categories
General Aptitude
1.3k
Engineering Mathematics
5.5k
Digital Logic
2.1k
Programming & DS
4k
Programming
2.9k
DS
1k
Algorithms
3.4k
Theory of Computation
4.2k
Compiler Design
1.6k
Operating System
3k
Databases
3.1k
CO & Architecture
2.7k
Computer Networks
3.1k
Non GATE
1.1k
Others
1.4k
Admissions
501
Exam Queries
449
Tier 1 Placement Questions
19
Job Queries
62
Projects
12
Follow @csegate
Gatecse
Recent questions and answers in DS
Recent Blog Comments
Books are there but don't think any will leave ...
Sir i have placed the order Details are PAYMENT ...
Sir i am placing order for gate overflew book ...
Yes, their tracking system is incomplete. ...
India post don't update the tracking details. No ...
38,084
questions
45,574
answers
132,084
comments
49,062
users