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
All Activity
Questions
Unanswered
Tags
Categories
Users
Ask a Question
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
Made Easy Test Series:Data StructureStack
There is given a infix expression: ${\color{Red} {1}}$ $A+B\times C/\left ( \left ( D+E \right )+F\times G \right )$ While converting infix expression to postfix expression number of symbols in the stack at indicated ... $5$, but is it correct? Can anyone give some explanation??
asked
May 6
in
DS
by
srestha
Veteran
(
114k
points)

60
views
madeeasytestseries
datastructure
stack
0
votes
2
answers
2
Made Easy Test Series: DSHash Table
Consider a hash table with $N$ slots. It is given that the collision resolution technique used in chaining. Assume simple uniform hashing, what is the probability that the last $k$ slots are unfilled after the first $'r'$ insertions? $A)\left ( 1\frac{N}{k} \right )^{r}$ ... $C)\left ( 1+\frac{N}{k} \right )^{r1}$ $D)\left ( 1\frac{k}{N} \right )^{r1}$
asked
May 5
in
DS
by
srestha
Veteran
(
114k
points)

42
views
datastructure
madeeasytestseries
hashing
0
votes
1
answer
3
Made Easy Test Series:DSBinary Tree
Consider the following function foobar(), which takes binary tree as input. int foobar(struct node *root){ if(!root) return 0; if((!root>left)&&(!root>right)) return 10; else{ int i=foobar(root>left); int j=foobar(root> ... $C)$ Sum of leaves node of binary tree. $D)$ None What return $10$ actually means?
asked
May 4
in
DS
by
srestha
Veteran
(
114k
points)

27
views
madeeasytestseries
datastructure
0
votes
1
answer
4
Made Easy Test Series: Array
Consider a 2D array $A\left [ 40.........95,40........95 \right ]$ in lower triangular matrix representation. Size of each element of array is $1B.$ If the array is implemented in memory in the form of row major order and base address of the array is $1000.$, the address of $A\left [66 \right ]\left [ 50 \right ]$ will be__________ will it be 1361 or 1362?
asked
May 3
in
DS
by
srestha
Veteran
(
114k
points)

25
views
datastructure
madeeasytestseries
0
votes
1
answer
5
Made Easy Test Series: DS
A $d$ary heap is a binary heap, but instead of $2$ children, nodes have $d$ children. A $dary$ heap can be represented by $1D$ array as follows. The root is kept in $A[1]$, and it's $d$ children are kept in order in $A[2]$ through $A[d+1]$ ... $A\left [ d^{2}+d+2 \right ]$
asked
May 2
in
DS
by
srestha
Veteran
(
114k
points)

54
views
madeeasytestseries
datastructure
0
votes
1
answer
6
Made Easy Test Series: Data Structure
$A)$ Rotation operation of AVL tree always preserves the inorder numbering. $B)$ If every node of BST has either $0$ or $2$ children , then searching time is $O(log n)$ Which statement is correct? Given $A)$ is correct but $B)$ is not. Plz explain how?
asked
May 2
in
DS
by
srestha
Veteran
(
114k
points)

25
views
datastructure
madeeasytestseries
0
votes
1
answer
7
Made Easy Test Series:Binary Tree
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 ... $B$ is $(len== 1)$ which of these two option correct? Please Explain.
asked
Apr 30
in
DS
by
srestha
Veteran
(
114k
points)

69
views
madeeasytestseries
datastructure
0
votes
0
answers
8
Made Easy Test Series:Data Structure
Assume a Binary Search Tree is not allowed to have duplicates, there is more than one way to delete a node in the tree when the node has two children.If we resolve the situation in favor of choosing element for replacement from ... ? If we resolve the situation in favor of choosing element for replacement from left substructure what this line exactly means?
asked
Apr 30
in
DS
by
srestha
Veteran
(
114k
points)

17
views
datastructure
madeeasytestseries
0
votes
1
answer
9
Self Doubt on Linked List
Can somebody write the code or algorithm, how merge sort works efficiently in linked list? Is Heap sort most inefficient in Linked List Sorting? Elaborate plz
asked
Apr 29
in
DS
by
srestha
Veteran
(
114k
points)

27
views
linkedlists
datastructure
0
votes
1
answer
10
IIIT PGEE 2019
Which of the following gives O(1) complexity if we want to check whether an edge exists between two given nodes in a graph? Adjacency List Adjacency Matrix Incidence Matrix None of these
asked
Apr 29
in
DS
by
manikgupta123
(
115
points)

83
views
iiithpgee
graphtheory
timecomplexity
0
votes
2
answers
11
Made Easy Test Series:DSStack and Queue
Consider a single array $A\left [ 0...........(n1) \right ]$ is used to implement two stacks. Two stacks grows from opposite end of the array. Variable $top_{1}$ and $top_{2}$ points to the location of the topmost elements in each of the stacks ... the number of elements are present in the array at any time? $A)ntop_{2}+top_{1}$ $B)n+1top_{2}+top_{1}$
asked
Apr 26
in
DS
by
srestha
Veteran
(
114k
points)

51
views
datastructure
madeeasytestseries
+1
vote
3
answers
12
Made Easy Test Series:Programming and DS
Which of the following data structure is efficient to implement priority queue such as insertion ,deletion, searching? A)Linked List B)Heap C)Sorted Array D)Unsorted Array How priority queue can work more efficiently in any data structure, other than heap?
asked
Apr 24
in
DS
by
srestha
Veteran
(
114k
points)

128
views
madeeasytestseries
programminginc
programming
0
votes
0
answers
13
Made Easy Test Series:DS
I want longest path from root to leaf. Then which code is correct among Code1 or Code2? Code1) int tree(Struct node *root){ int a=0, b=0,c=0; if(root==NULL) return 0; if((root>left==NULL)&&(root>right==NULL)) return 1; a=1+tree(root ... )&&(root>right==NULL)) return 1; a=tree(root>left); b=tree(root>right); c=1+max(a,b); return c; }
asked
Apr 22
in
DS
by
srestha
Veteran
(
114k
points)

54
views
madeeasytestseries
datastructure
0
votes
0
answers
14
Assignment 2.9 (b) page no. 28 from book Classic Data Structures Second Edition by Debasis Samanta
asked
Apr 18
in
DS
by
mahi.0409
(
7
points)

25
views
datastructure
debasissamanta
0
votes
0
answers
15
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
Apr 14
in
DS
by
Durga Teja
(
33
points)

36
views
datastructure
queues
0
votes
0
answers
16
# 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
(
103
points)

25
views
0
votes
0
answers
17
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
(
917
points)

26
views
avltree
datastructure
tree
bst
algorithms
0
votes
0
answers
18
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)

49
views
tree
+1
vote
1
answer
19
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
(
269
points)

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

153
views
0
votes
0
answers
21
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.7k
points)

77
views
0
votes
0
answers
22
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)

47
views
#binary
tree
0
votes
1
answer
23
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)

70
views
#array
0
votes
1
answer
24
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)

77
views
0
votes
3
answers
25
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
(
400k
points)

2.1k
views
gate2019
datastructure
heap
+4
votes
6
answers
26
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
(
400k
points)

4.6k
views
gate2019
numericalanswers
datastructure
binarytree
+1
vote
1
answer
27
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)

670
views
0
votes
3
answers
28
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)

438
views
0
votes
0
answers
29
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)

80
views
algorithms
0
votes
1
answer
30
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)

74
views
datastructure
binarytree
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
IIT Kanpur MS Interview experience
My GATE preparation and what you can learn from it
IIT Bombay RA (2019) Programming Questions
COAP Round 1 has started
MTECH (COUURSE WORK) AI INTERVIEW EXPERIENCE 2019
All categories
General Aptitude
1.6k
Engineering Mathematics
7.3k
Digital Logic
2.9k
Programming & DS
4.9k
Programming
3.5k
DS
1.3k
Algorithms
4.3k
Theory of Computation
6k
Compiler Design
2k
Operating System
4.2k
Databases
4.1k
CO & Architecture
3.4k
Computer Networks
4.2k
Non GATE
1.4k
Others
1.5k
Admissions
591
Exam Queries
575
Tier 1 Placement Questions
23
Job Queries
72
Projects
18
Follow @csegate
Recent questions in DS
Recent Blog Comments
It was free when I gave them, maybe they made it...
The tests are there but it ain't free. Cost is...
They removed their tests recently, I think it'll...
how did you get Success gateway test series for...
49,408
questions
53,593
answers
185,824
comments
70,874
users