The Gateway to Computer Science Excellence
For all GATE CSE Questions
Toggle navigation
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 and answers in DS
+13
votes
3
answers
1
GATE19871xv
In a circular linked list oraganisation, insertion of a record involves modification of One pointer. Two pointers. Multiple pointers. No pointer.
answered
1 day
ago
in
DS
by
techbd123
Active
(
1.4k
points)

2.6k
views
gate1987
datastructure
linkedlists
+31
votes
6
answers
2
GATE2005IT50
In a binary tree, for every node the difference between the number of nodes in the left and right subtrees is at most $2$. If the height of the tree is $h > 0$, then the minimum number of nodes in the tree is $2^{h1}$ $2^{h1} + 1$ $2^h  1$ $2^h$
answered
4 days
ago
in
DS
by
Arjun
Veteran
(
421k
points)

3.7k
views
gate2005it
datastructure
binarytree
normal
+2
votes
3
answers
3
Heap __ ME
The number of min heap trees are possible with 15 elements such that every leaf node must be greater than all nonleaf nodes of the tree are ________
answered
4 days
ago
in
DS
by
ankitron
(
113
points)

712
views
heap
0
votes
1
answer
4
# iit goa data strructre
5. Assume I have a stack s, a queue q, and a binary search tree t. Initially all of them are empty. Indicate the state of the data structures at line number 7 and at the end. What is the maximum height each of the data structures had during the execution? 1 i $\rightarrow$ 0 ... 0 8 while i <= 9 do 9 t.insert(s.pop()) 10 t.insert(q.get()) 11 i $\rightarrow$ i + 1 12 end
answered
6 days
ago
in
DS
by
Spidey_guy
(
111
points)

59
views
queue
stack
+1
vote
2
answers
5
Made Easy Test Series:Binary Trees
Consider the following function height, to which pointer to the root node of a binary tree shown below is passed Note that max(a,b) defined by #define max(a,b) (a>b)?a:b. int height(Node *root) The output of the above code will be _________________
answered
Oct 16
in
DS
by
Shagun Singh
(
233
points)

133
views
madeeasytestseries
binarytree
0
votes
2
answers
6
Book: MCQs in Computer Science by TJ williams
A sorting technique that guarantees that records with same primary key in the same order in the sorted list as in the original unsorted list is said to be....
answered
Oct 16
in
DS
by
Shagun Singh
(
233
points)

51
views
+18
votes
9
answers
7
GATE2017213
A circular queue has been implemented using a singly linked list where each node consists of a value and a single pointer pointing to the next node. We maintain exactly two external pointers FRONT and REAR pointing to the front node and the rear node of the queue, respectively. Which of ... node points to the front node. (I) only. (II) only. Both (I) and (II). Neither (I) nor (II).
answered
Oct 14
in
DS
by
JashanArora
Junior
(
827
points)

7.8k
views
gate20172
datastructure
queues
0
votes
1
answer
8
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
answered
Oct 14
in
DS
by
MonikaV
(
115
points)

97
views
avltree
datastructure
tree
+81
votes
14
answers
9
GATE2016240
The number of ways in which the numbers $1, 2, 3, 4, 5, 6, 7$ can be inserted in an empty binary search tree, such that the resulting tree has height $6$, is _________. Note: The height of a tree with a single node is $0$.
answered
Oct 14
in
DS
by
techbd123
Active
(
1.4k
points)

12.1k
views
gate20162
datastructure
binarysearchtree
normal
numericalanswers
+21
votes
4
answers
10
GATE19961.12
Consider the following statements: Firstinfirst out types of computations are efficiently supported by STACKS. Implementing LISTS on linked lists is more efficient than implementing LISTS on an array for almost all the basic LIST operations. Implementing QUEUES on a circular array is more efficient than ... and $(ii)$ are true $(iii)$ and $(iv)$ are true $(ii)$ and $(iv)$ are true
answered
Oct 9
in
DS
by
Ekta07_GATE
(
179
points)

2.6k
views
gate1996
datastructure
easy
queues
stack
linkedlists
+10
votes
7
answers
11
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) _________.
answered
Oct 8
in
DS
by
arjuno
(
33
points)

5.3k
views
gate2019
numericalanswers
datastructure
binarytree
0
votes
1
answer
12
Made easy doubt
Consider the following keys that are hashed into the hash table in the given order using the hash function H(key) = key mod 11. 12, 44, 13, 88, 23, 94, 11, 39, 20, 16, 21 Where hash table using quarditic probing of mod11 to handle the collisions, ... go inside the hash table ________ (value will be a whole number). I can't understand what is "i" is it number of collision?
answered
Oct 5
in
DS
by
tech_beardo
(
151
points)

134
views
+9
votes
5
answers
13
GATE201820
The postorder traversal of a binary tree is $\text{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 _____
answered
Oct 3
in
DS
by
techbd123
Active
(
1.4k
points)

2.3k
views
gate2018
datastructure
binarytree
numericalanswers
+1
vote
1
answer
14
Depth First Search: Finding if The graph is connected
Better Explanation??
answered
Sep 26
in
DS
by
tech_beardo
(
151
points)

44
views
datastructure
dfs
graphalgorithms
+28
votes
10
answers
15
GATE201010
In a binary tree with $n$ nodes, every node has an odd number of descendants. Every node is considered to be its own descendant. What is the number of nodes in the tree that have exactly one child? $0$ $1$ $\frac{(n1)}{2}$ $n1$
answered
Sep 26
in
DS
by
Rahul Bidla
(
165
points)

3.4k
views
gate2010
datastructure
binarytree
normal
+42
votes
9
answers
16
GATE200364
Let S be a stack of size $n \geq1$. Starting with the empty stack, suppose we push the first n natural numbers in sequence, and then perform $n$ pop operations. Assume that Push and Pop operations take $X$ seconds each, and $Y$ seconds elapse between the end of one such stack operation ... from S. The average stacklife of an element of this stack is $n(X+Y)$ $3Y+2X$ $n(X+Y)X$ $Y+2X$
answered
Sep 23
in
DS
by
arjuno
(
33
points)

6.5k
views
gate2003
datastructure
stack
normal
+24
votes
5
answers
17
GATE20052
An Abstract Data Type (ADT) is: same as an abstract class a data type that cannot be instantiated a data type for which only the operations defined on it can be used, but none else all of the above
answered
Sep 22
in
DS
by
Ekta07_GATE
(
179
points)

2.7k
views
gate2005
datastructure
normal
abstractdatatype
0
votes
1
answer
18
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 _______________
answered
Sep 21
in
DS
by
tech_beardo
(
151
points)

92
views
algorithms
0
votes
1
answer
19
Insertion in Hash table. (M.E.)
The number of different insertion sequences of numbers $\left \{ 7,20,32,50,66,77 \right \}$ on an initially empty hash table H of size $6$ and a hash function $h\left ( k \right )=k\mod6$ with linear probing scheme for collision resolution such that the hash table obtained ... ${\color{Blue} {2}}$ ${\color{Blue} {3}}$. ${\color{Blue} {4}}$ ${\color{Blue} {5}}$
answered
Sep 10
in
DS
by
scholaraniket
(
245
points)

178
views
hashing
datastructure
+4
votes
3
answers
20
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}$
answered
Sep 10
in
DS
by
scholaraniket
(
245
points)

115
views
datastructure
madeeasytestseries
hashing
+42
votes
9
answers
21
GATE201053
A hash table of length $10$ uses open addressing with hash function $h(k) = k \: mod \: 10$, and linear probing. After inserting $6$ ... sequences of the key values using the same hash function and linear probing will result in the hash table shown above? $10$ $20$ $30$ $40$
answered
Sep 9
in
DS
by
scholaraniket
(
245
points)

6.2k
views
datastructure
hashing
normal
gate2010
+18
votes
5
answers
22
GATE19941.14
Which of the following permutations can be obtained in the output (in the same order) using a stack assuming that the input is the sequence $\text{1, 2, 3, 4, 5}$ in that order? $\text{3, 4, 5, 1, 2}$ $\text{3, 4, 5, 2, 1}$ $\text{1, 5, 2, 3, 4}$ $\text{5, 4, 3, 1, 2}$
answered
Sep 9
in
DS
by
SUBRATO KUMAR
(
17
points)

5.5k
views
gate1994
datastructure
stack
normal
+23
votes
3
answers
23
GATE200610
In a binary max heap containing $n$ numbers, the smallest element can be found in time $O(n)$ $O(\log n)$ $O(\log \log n)$ $O(1)$
answered
Aug 27
in
DS
by
JashanArora
Junior
(
827
points)

3.3k
views
gate2006
datastructure
heap
easy
+48
votes
8
answers
24
GATE2017108
Consider the C code fragment given below. typedef struct node { int data; node* next; } node; void join(node* m, node* n) { node* p = n; while(p>next != NULL) { p = p>next; } p>next = m; } Assuming that m and n point to valid NULL ... or append list m to the end of list n. cause a null pointer dereference for all inputs. append list n to the end of list m for all inputs.
answered
Aug 21
in
DS
by
AbhayPrajapati
(
21
points)

7.9k
views
gate20171
datastructure
linkedlists
normal
0
votes
1
answer
25
gate : Heap questions
An array of integers of size n can be converted into a heap by adjusting the heaps rooted at each internal node of the complete binary tree starting at the node ⌊(n  1) /2⌋, and doing this adjustment up to the root node (root node is at index 0) in the order ⌊(n ... n) O (n log log n) O(n log n) I dont get what question meant can ny implemented on following array 1,2,3,4,5 ?
answered
Aug 16
in
DS
by
gorya506
(
175
points)

199
views
0
votes
1
answer
26
Can one describe it in easy meaning ?
An algorithm performs (log N)1/2 find operations , N insert operations, (log N)1/2 delete operations, and (log N)1/2 decreasekey operations on a set of data items with keys drawn from a linearly ordered set . For ... to achieve the best total asymptotic complexity considering all the operations? Unsorted array Min  heap Sorted array Sorted doubly linked list
answered
Aug 16
in
DS
by
gorya506
(
175
points)

33
views
+2
votes
3
answers
27
data structure
answered
Aug 16
in
DS
by
gorya506
(
175
points)

98
views
+37
votes
6
answers
28
GATE200323
In a minheap with $n$ elements with the smallest element at the root, the $7^{th}$ smallest element can be found in time $\Theta (n \log n)$ $\Theta (n)$ $\Theta(\log n)$ $\Theta(1)$
answered
Aug 16
in
DS
by
iarnav
Loyal
(
8.2k
points)

8.5k
views
gate2003
datastructure
heap
+1
vote
1
answer
29
Complexity
What is the time complexity of adding an element at the front of a circular linked list ? O(n) or theta(n) ? How to find whether it is O or theta ?
answered
Aug 16
in
DS
by
gorya506
(
175
points)

46
views
+1
vote
2
answers
30
MadeEasy Subject Test: Programming & DS  Trees
A 4ary tree,i.e. each node has either 0 or 4 children tree has 20 leaf nodes. Then the total number of nodes in the tree are ____.
answered
Aug 16
in
DS
by
gorya506
(
175
points)

93
views
madeeasytestseries
datastructure
trees
+1
vote
1
answer
31
AVL Tree
Suppose we have an AVL tree of n nodes and any change in the tree violates the AVL tree property then : S1: If we insert an element in the tree, maximum 2 Rotations are required to make the Tree AVL again. S2: If we delete an element from the tree, maximum 2 Rotations are required to make tree AVL again Which are correct statements?
answered
Aug 15
in
DS
by
gorya506
(
175
points)

97
views
avltree
datastructure
tree
0
votes
1
answer
32
Testbook Test Series: Programming & DS  Stack
A queue is implemented using two stacks S1 and S2. Initially the queue contains 1, 2, 3, 4 from front to rear. The following operations are performed in the queue: delete, insert (5), delete, Then how many total no. of push and pop operations are needed to perform ... ? a) Push: 12 Pop: 13 b) Push: 15 Pop: 16 c) Push: 11 Pop: 10 d) Push: 12 Pop: 11
answered
Aug 15
in
DS
by
gorya506
(
175
points)

165
views
testbooktestseries
data
datastructure
stack
0
votes
1
answer
33
#DS Inserting elements into Min Heap?
The number of distinct min heap are possible with keys 1, 2, 3, 4, 5 are ________. I know, there are variance of this question for Max heap and even for Min heap, the answer won't change, but I just wanna know if my technique is right or not. ===== ... any value. > Lastly the right sub tree => 1C1 = 1 Totally  1*4C3*1*2*1 = 8. Is this approach correct?
answered
Aug 15
in
DS
by
gorya506
(
175
points)

126
views
algorithms
binaryheap
heap
datastructure
0
votes
1
answer
34
Ace Test Series: Data Structures  Circular Linked List
answered
Aug 15
in
DS
by
gorya506
(
175
points)

79
views
acetestseries
datastructure
linkedlists
0
votes
1
answer
35
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.
answered
Aug 15
in
DS
by
gorya506
(
175
points)

59
views
graph
dfs
algorithms
0
votes
1
answer
36
madeeasy
I think it is loglogn
answered
Aug 14
in
DS
by
gorya506
(
175
points)

53
views
0
votes
2
answers
37
made easy mock
consider the min heap tree.minimum number of comparisons to required to maintain the heap property after deletion of root are according to me 3, because we just need to check b/w the 2 childs as parent will be definitely greater than both of its children! am i wrong?
answered
Aug 14
in
DS
by
gorya506
(
175
points)

29
views
+1
vote
1
answer
38
#bst tree
The number of BST possible with 6 node numbered 1,2,3,4,5 and 6 with exactly one leaf node
answered
Aug 14
in
DS
by
gorya506
(
175
points)

61
views
binarytree
0
votes
1
answer
39
NIELIT 201884
For the given nodes: $89, 19, 50, 17, 12, 15, 2, 5, 7, 11, 6, 9, 100$ minimum ______ number of interchanges are required to convert it into a maxheap. $3$ $4$ $5$ $6$
answered
Aug 13
in
DS
by
Shiva Sagar Rao
(
463
points)

37
views
nielit2018
heap
datastructure
+19
votes
3
answers
40
GATE19948
A rooted tree with $12$ nodes has its nodes numbered $1$ to $12$ in preorder. When the tree is traversed in postorder, the nodes are visited in the order $3, 5, 4, 2, 7, 8, 6, 10, 11, 12, 9, 1$. Reconstruct the original tree from this information, that is, find the parent of each node, and show the tree diagrammatically.
answered
Aug 11
in
DS
by
blackcloud
(
135
points)

1.8k
views
gate1994
datastructure
binarytree
normal
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
Recent Posts
Standard Book Exercise Questions for Computer Science
Resource to Learn Graph Theory Interactively
Recruitment to the post of Scientist/Engineer 'SC' (Electronics, Mechanical and Computer Science)
Standard Videos for Calculus
Standard Videos for Linear Algebra
All categories
General Aptitude
1.8k
Engineering Mathematics
7.3k
Digital Logic
2.9k
Programming and DS
4.9k
Programming
3.5k
DS
1.3k
Algorithms
4.4k
Theory of Computation
6.2k
Compiler Design
2.1k
Operating System
4.2k
Databases
4.1k
CO and Architecture
3.4k
Computer Networks
4.1k
Non GATE
1.6k
Others
1.8k
Admissions
595
Exam Queries
576
Tier 1 Placement Questions
23
Job Queries
72
Projects
17
Follow @csegate
Recent questions and answers in DS
Recent Blog Comments
Are the answers also present ?
@Arjun sir , Is there any page or something where...
@arjun sir but u called about providing the pdfs...
But anyhow I appreciate this. The questions of...
All these PYQ blogs and standard videos blogs...
50,407
questions
55,861
answers
192,658
comments
91,649
users