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.
Recent questions tagged datastructure
Webpage for Data Structures
0
votes
1
answer
1
BST Data Structure
a:) If given Tree is BST => Inorder of keys is sorted b:) Inorder of keys is sorted => Tree is BST(converse of above) I know first one holds.Is second one also true?If not can someone give counter example?
asked
Apr 12
in
Programming
by
rahul sharma 5
Boss
(
22.7k
points)

62
views
datastructure
algorithms
programminginc
tree
0
votes
0
answers
2
Implementing Graph Data structure in C++
asked
Apr 8
in
Programming
by
Jason
Active
(
1.2k
points)

24
views
datastructure
algorithms
graphalgorithms
0
votes
1
answer
3
Stack and queue
Hi please verify me We can implement a stack using only one queue. Like first insert into queue and for popping a element from stack dequeue n1 element from queue and enque into queue and then pop last element and do the same each time......try it and verify that I am right or wrong?
asked
Apr 7
in
Programming
by
Ravi prakash pandey
Junior
(
743
points)

55
views
datastructure
queues
stack
0
votes
1
answer
4
Doubt
Let $S$ be a sorted array of n integers. Let $T(n)$ denote the time taken for the most efficient algorithm to determined all elements with sum less than $10000$ in $S$. Which of the following statement is true? $T(n)$ is $O(1)$ $n \leq T(n)\leq nlog_2n$ $nlog_2n\leq T(n)<n^2$ $T(n)=(n^2)$ $\text{None of these}$.
asked
Mar 29
in
Algorithms
by
Angkit
Active
(
3.5k
points)

35
views
algorithms
datastructure
0
votes
1
answer
5
self doubt
given an array which contains the preorder traversal of full $kary$ tree. Give an algorithm for constructing the full $kary$ tree
asked
Mar 29
in
Algorithms
by
Kaluti
Loyal
(
5.3k
points)

22
views
datastructure
algorithms
0
votes
1
answer
6
SAnfoundary
What data structure would you most likely see in a nonrecursive implementation of a recursive algorithm? Linked List Stack Queue Tree please explain also
asked
Mar 23
in
Programming
by
Moin Mukhtar
(
251
points)

63
views
datastructure
recursion
+4
votes
1
answer
7
Binary Tree
What is the number of binary trees with 4 nodes which when traversed in preorder gives the sequence 1,2,3,4?
asked
Mar 22
in
DS
by
srestha
Veteran
(
81.7k
points)

130
views
datastructure
binarytree
+3
votes
0
answers
8
Binary Search Tree
When searching for the key value 30 in a binary search tree, nodes containing the key values 10, 20, 25, 35, 70, 80, 90, 100 are traversed, not necessarily in the order given. How many different orders are possible in which these key values can occur on the search ...  what is difference between solution 1) and solution 2)? why in both case answer is different?
asked
Mar 22
in
DS
by
srestha
Veteran
(
81.7k
points)

70
views
datastructure
bst
0
votes
0
answers
9
BFSBreadth first search
State True or False with explanation The depth of a breadthfirst search tree on an undirected graph $G = (V, E)$ from an arbitrary vertex $v \in V$ is the diameter of the graph $G$. (The diameter $d$ of a graph is the smallest $d$ such that every pair of vertices $s$ and $t$ have $\delta(s, t) \leq d$)
asked
Mar 21
in
DS
by
akshat sharma
Active
(
1.5k
points)

57
views
bfs
datastructure
0
votes
2
answers
10
Tree question
In delete operation of BST, we need inorder successor (or predecessor) of a node when the node to be deleted has both left and right child as nonempty. Which of the following is true about inorder successor needed in delete operation? Inorder Successor ... Inorder successor may be an ancestor of the node Inorder successor is always either a leaf node or a node with empty right child
asked
Mar 21
in
DS
by
Mohit Srivastava
(
31
points)

38
views
datastructure
tree
0
votes
0
answers
11
Programming and dS
There are p prisoners and c ( > p) cell blocks. c and p will be given as input. Also a sorted list of c integers will be given. You are required to choose p integers from c integers such that the minimum distance between adjacent prisoners is maximized. You have to output this minimum distance.
asked
Mar 19
in
Programming
by
rahul sharma 5
Boss
(
22.7k
points)

40
views
datastructure
0
votes
0
answers
12
Data Structure and algorithm
How to solve it .... A file $F$ holds the nonzero elements of two large $n\times n$ matrices, $A$ and $B$. The matrix entries are stored as triplets $(i,j,value),$ where $value$ is the $(i,j)^{th}$ element of a matrix. The ... give reasons. If yes, provide a solution. Clearly explain the data structure and how you are going to store, retrieve, and add the elements.
asked
Mar 16
in
Programming
by
None ...
(
95
points)

62
views
datastructure
algorithms
+1
vote
0
answers
13
GATE1997_16
In this GATE ques Part a) For Size balanced tree the recurrence (max height) is T(h)=T(h1) +T(h2) +1, solving which we get T(0)=1, T(1)=2,T(2)=1+2+1=4, T(3)=4+2+1=7 Here, T(0),T(1),T(2) are of the form 2h but T(3) is not equal to 23 then how can we claim that "sizebalance binary tree of height 'h' contain at least 2h nodes." ?
asked
Mar 14
in
DS
by
Mamta Satywali
Active
(
2.2k
points)

99
views
gate1997
datastructure
binarytree
+1
vote
1
answer
14
AVL tree
Consider the following elements inserted into an empty AVL tree in the following order 25, 10, 15, 17, 30, 35, 40, 21, 28 If [L(d)] be the sum of elements on left side of root and (Rd) be the sum of elements on right side of root, then the value of [(Rd) â€“ (Ld) + Root] is ________.
asked
Mar 11
in
DS
by
pankaj_vir
Loyal
(
6.2k
points)

55
views
avltree
datastructure
tree
+1
vote
1
answer
15
Algorithms : Binary search vs ternary search
asked
Mar 8
in
Algorithms
by
rahul sharma 5
Boss
(
22.7k
points)

102
views
binarysearch
datastructure
algorithms
+1
vote
1
answer
16
Heaps
How many Binary MaxHeaps can be constructed from the elements {1,1,2,2,3,3,4,4} ?
asked
Mar 3
in
DS
by
Balaji Jegan
Junior
(
883
points)

161
views
heap
datastructure
0
votes
0
answers
17
How large can the ratio of two memory requirements get?
asked
Mar 3
in
DS
by
XbrucewayneX
(
93
points)

56
views
datastructure
arrays
spacecomplexity
+1
vote
1
answer
18
Uttrakhand Asst. Professor Exam64
Which of the following problem cannot be solved without recursion? Tower of Hanoi Fibonacci series Tree Traversal None of the above
asked
Mar 2
in
Others
by
gatecse
Boss
(
17.8k
points)

24
views
uttarakhandasstprof2018
datastructure
0
votes
1
answer
19
Uttrakhand Asst. Professor Exam63
If there is a graph such that there is a unique path between any pair of vertices. The graph is a ________ Mesh Grid Tree Bipartite graph
asked
Mar 2
in
Others
by
gatecse
Boss
(
17.8k
points)

45
views
uttarakhandasstprof2018
graphtheory
datastructure
0
votes
1
answer
20
Uttrakhand Asst. Professor Exam41
Which of the following is not used for hash function? Midsquare method Division method Folding method Probe method
asked
Mar 2
in
Others
by
gatecse
Boss
(
17.8k
points)

19
views
uttarakhandasstprof2018
datastructure
hashing
0
votes
1
answer
21
Uttrakhand Asst. Professor Exam39
If the post order traversal of tree gives $ab  cd * +$, then the label of the nodes A, B, C, ......, G will be a, , b, +, c, *, d +, , *, a, b, c, d , a, +, b, c, d, * a, b, c, d, , *, +
asked
Mar 2
in
Others
by
gatecse
Boss
(
17.8k
points)

37
views
uttarakhandasstprof2018
datastructure
trees
0
votes
1
answer
22
Uttrakhand Asst. Professor Exam19
Which of the following search method takes less memory ? Depthfirst search Breadthfirst search Linear search None of the above
asked
Mar 2
in
Others
by
gatecse
Boss
(
17.8k
points)

16
views
uttarakhandasstprof2018
datastructure
searching
0
votes
1
answer
23
Uttrakhand Asst. Professor Exam10
Which of the following table implementation is based on the property of the locality of reference ? Hash table Search table Linear list Self organizing list
asked
Mar 2
in
Others
by
gatecse
Boss
(
17.8k
points)

26
views
uttarakhandasstprof2018
datastructure
algorithms
0
votes
1
answer
24
Satellite Data in Data Structure
What exactly is Satellite Data in Data structures? struct BST { int key; char name[20]; struct BST* left; struct BST* right; struct BST* parent; }; What will be satellite data in above node considering BST in made with 'int key' as key?Is structure essential data like left,right,parent pointer for tree implementation a part of satellite data?
asked
Mar 1
in
DS
by
rdfan19
Junior
(
715
points)

63
views
datastructure
terminology
0
votes
1
answer
25
Doubt regarding deletion from a Btree
After deleting an element from a Btree,I could rearrange the tree in several ways,that would still complies to the rules of Btrees.But,we are supposed to follow a certain set of rules for rearranging the tree after deleting an element. Why is that ?
asked
Mar 1
in
Algorithms
by
Mathews George
(
13
points)

56
views
btree
datastructure
trees
0
votes
0
answers
26
#Data Structure
I was asked sometime ago in an interview draw generalised form of AVL tree that will contain all four rotations of AVL tree. I got confused I tried to explain them such notations one by one by drawing a tree on the board but they insisted me of some generalised form. Kindly help
asked
Feb 19
in
DS
by
Khursheed Bhat
(
29
points)

71
views
datastructure
avltree
+1
vote
1
answer
27
Binary Tree
I have doubt when its asked to know number of labelled and unlabelled binary tree : For labelled = (On basis of labelling) T(n) = 2nCn/(n+1) * n! For unlabelled = (On Basis of Geometric Sturucture) T(n) = (2n)Cn/n+1 Right? What if its Asked for BST what will be the answer in both the above cases and Why?
asked
Feb 17
in
Algorithms
by
Na462
Active
(
1.6k
points)

72
views
datastructure
binarytree
binarysearchtree
algorithms
+5
votes
4
answers
28
GATE201820
The postorder traversal of a binary tree is 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 _____
asked
Feb 14
in
DS
by
gatecse
Boss
(
17.8k
points)

1.2k
views
gate2018
datastructure
binarytree
numericalanswers
+6
votes
2
answers
29
GATE20183
A queue is implemented using a noncircular singly linked list. The queue has a head pointer and a tail pointer, as shown in the figure. Let $n$ denote the number of nodes in the queue. Let 'enqueue' be implemented by inserting a new node at the head, and 'dequeue' be implemented by deletion ... $\theta(1), \theta(1)$ $\theta(1), \theta(n)$ $\theta(n), \theta(1)$ $\theta(n), \theta(n)$
asked
Feb 14
in
DS
by
gatecse
Boss
(
17.8k
points)

1.6k
views
gate2018
algorithms
datastructure
queues
normal
linkedlists
0
votes
1
answer
30
ugc net 2004
What item is at the root after the following sequence of insertions into an empty splay tree: $1, 11, 3, 10, 8, 4, 6, 5, 7, 9, 2 ?$ $1$ $2$ $4$ $8$
asked
Feb 13
in
IS&Software Engineering
by
GD Rana
(
9
points)

58
views
datastructure
splaytree
Page:
1
2
3
4
5
6
...
27
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
Suggestion for IIITH exam
Placement Statistics for Computer Science
IIT Bombay Admission
ISRO 2018
NTRO Final year Eligibility
Follow @csegate
Gatecse
Recent questions tagged datastructure
Recent Blog Comments
Yes. I cleared the test and got selected.
Did you clear the test? Were you selected?
No. There was no penalty. We were allowed to ...
You have to write the entire code. I attempted 5 ...
Let's say c = 5 and p = ...
34,773
questions
41,737
answers
118,895
comments
41,384
users