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 tagged datastructure
Webpage for Data Structures
0
votes
0
answers
1
Made Easy Test Series: Stack Address
A stack based CPU executes the instruction. Memory location $500$ contain $0X 88$ and memory location $700$ contain $0X37$. The stack pointer is at $0X003F$ The instruction are as follows: $I_{1}:PUSH$ $500$ $I_{2}:PUSH$. $700$ ... execution of instruction. $C)$ Memory location $600$ contain $0XBF$ after execution of instruction. $D)$ Both $a)$ and $c)$
asked
1 day
ago
in
DS
by
srestha
Veteran
(
114k
points)

5
views
madeeasytestseries
datastructure
stack
+1
vote
0
answers
2
Vani Qs Bank Algorithms
.Given an array of distinct integers A[1, 2,…n]. Find the tightest upper bound to check the existence of any index i for which A[i]=i. Ans should be O(log n) right by doing binary search ??
asked
2 days
ago
in
Algorithms
by
Hirak
Active
(
2.1k
points)

38
views
algorithms
datastructure
arrays
searching
0
votes
1
answer
3
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
4
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)

43
views
datastructure
madeeasytestseries
hashing
0
votes
0
answers
5
Made Easy Test Series:DSArray
Consider the integer array $A\left [ 1.........100,1.......100 \right ]$ in which the elements are stored in $Z$ representation. An example of a $5\times 5$ array in $Z$ representation is shown below: If the base address of $A$ is ... $A$ is stored in Row Major Order, then the address corresponding to $A\left [ 100 \right ]\left [ 55 \right ]$ is ________________
asked
May 4
in
Programming
by
srestha
Veteran
(
114k
points)

53
views
madeeasytestseries
datastructure
0
votes
1
answer
6
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)

28
views
madeeasytestseries
datastructure
0
votes
1
answer
7
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
8
Made Easy Test Series: ProgrammingRecursive and Iterative Program
$I=$Iterative Program $R=$ Recursive Program $(A)$ For every program belonging to class $I$, there is an equivalent program to class $R.$ $(B)$ Every program in $R$ uses strictly more stack space compared to equivalent program in $I.$ Among $(A)$ and $(B)$ which one is correct?
asked
May 3
in
Programming
by
srestha
Veteran
(
114k
points)

13
views
madeeasytestseries
datastructure
0
votes
1
answer
9
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
10
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)

28
views
datastructure
madeeasytestseries
0
votes
1
answer
11
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)

74
views
madeeasytestseries
datastructure
0
votes
0
answers
12
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)

18
views
datastructure
madeeasytestseries
0
votes
1
answer
13
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
2
answers
14
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)

54
views
datastructure
madeeasytestseries
0
votes
1
answer
15
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)

57
views
madeeasytestseries
datastructure
0
votes
0
answers
16
Practicing Algorithms and Data Structures for Interview
I have got a good GATE rank in 2019 and most probably I will get into IITB TA. I am thinking of working on algorithms and data structures before I join. I have gone through a lot of content regarding ... someone provide some pointers or any resources that help me improve my skills for competitive coding or interview preparation in general?
asked
Apr 20
in
Others
by
gmrishikumar
Active
(
1.8k
points)

88
views
datastructure
interview
algorithms
competitivecoding
0
votes
0
answers
17
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
18
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)

37
views
datastructure
queues
0
votes
0
answers
19
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
20
StackDS(Conceptual Doubt)
Is it TRUE or FALSE? Stack allocation can allocate and deallocate dynamic variables and can manage runtime storage
asked
Apr 3
in
Algorithms
by
srestha
Veteran
(
114k
points)

56
views
datastructure
stack
+1
vote
1
answer
21
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)

53
views
datastructure
0
votes
1
answer
22
Internal Path Length of BST
Consider the following binary tree with root at level 0. What is the internal path length for the above tree? 31 14 29 32
asked
Mar 10
in
Algorithms
by
s_dr_13
(
147
points)

88
views
bst
binarysearchtree
tree
datastructure
0
votes
0
answers
23
Hashing
Consider an open address hash table with uniform hashing. Out of 10 locations, 8 are occupied. What are the expected number of probes in an unsuccessful and successful search respectively?
asked
Mar 6
in
Algorithms
by
s_dr_13
(
147
points)

78
views
hashing
datastructure
uniformhashing
probability
0
votes
3
answers
24
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
25
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
26
BFS traversal path
What will be the path from AH if BFS is used in the following graph?
asked
Feb 2
in
Algorithms
by
saptarshiDey
(
107
points)

77
views
graphalgorithms
algorithms
bfs
datastructure
0
votes
1
answer
27
Made easy
The given answer is c, but how?
asked
Jan 29
in
Programming
by
Jyoti Kumari97
(
235
points)

64
views
datastructure
0
votes
1
answer
28
Made easy
asked
Jan 28
in
Programming
by
Jyoti Kumari97
(
235
points)

80
views
datastructure
queues
circularqueue
+1
vote
2
answers
29
ME FLT2
AVL tree is constructed by inserting the keys 2, 6, 1, 5, 3, 4, 7 in the given order. (Assume the tree is initially empty). Then the level order traversal of the above binary tree will be.. Answer given is: 3,2,5,1,4,6,7
asked
Jan 28
in
Programming
by
balchandar reddy san
Active
(
3k
points)

68
views
datastructure
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
...
39
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 begun
MTECH (COUURSE WORK) AI INTERVIEW EXPERIENCE 2019
Follow @csegate
Recent questions tagged datastructure
Recent Blog Comments
@Anuj Mishra how did you study CLRS?what...
It was free when I gave them, maybe they made it...
The tests are there but it ain't free. Cost is...
49,430
questions
53,617
answers
185,969
comments
70,892
users