Login
Register
@
Dark Mode
Profile
Edit my Profile
Messages
My favorites
Register
Activity
Q&A
Questions
Unanswered
Tags
Subjects
Users
Ask
Previous Years
Blogs
New Blog
Exams
Dark Mode
Recent questions and answers in DS
2
votes
3
answers
1
GATE CSE 2023 | Question: 2
Which one of the following sequences when stored in an array at locations $A[1], \ldots, A[10]$ forms a max-heap? $23,17,10,6,13,14,1,5,7,12$ $23,17,14,7,13,10,1,5,6,12$ $23,17,14,6,13,10,1,5,7,15$ $23,14,17,1,10,13,16,12,7,5$
Souvik33
answered
in
DS
19 hours
ago
by
Souvik33
1.3k
views
gatecse-2023
data-structures
binary-heap
1-mark
45
votes
9
answers
2
GATE CSE 2011 | Question: 29
We are given a set of $n$ distinct elements and an unlabeled binary tree with $n$ nodes. In how many ways can we populate the tree with the given set so that it becomes a binary search tree? $0$ $1$ $n!$ $\frac{1} {n+1} .^{2n}C_n$
Vasudevarnabmessi
answered
in
DS
Mar 18
by
Vasudevarnabmessi
24.4k
views
gatecse-2011
binary-tree
normal
32
votes
10
answers
3
GATE CSE 2017 Set 1 | Question: 6
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.
Vasudevarnabmessi
answered
in
DS
Mar 18
by
Vasudevarnabmessi
14.3k
views
gatecse-2017-set1
data-structures
binary-search-tree
easy
29
votes
2
answers
4
GATE IT 2008 | Question: 73
How many distinct BSTs can be constructed with $3$ distinct keys? $4$ $5$ $6$ $9$
Vasudevarnabmessi
answered
in
DS
Mar 18
by
Vasudevarnabmessi
10.5k
views
gateit-2008
data-structures
binary-search-tree
normal
24
votes
6
answers
5
GATE CSE 2004 | Question: 4, ISRO2009-26
The following numbers are inserted into an empty binary search tree in the given order: $10, 1, 3, 5, 15, 12, 16$. What is the height of the binary search tree (the height is the maximum distance of a leaf node from the root)? $2$ $3$ $4$ $6$
Vasudevarnabmessi
answered
in
DS
Mar 18
by
Vasudevarnabmessi
19.5k
views
gatecse-2004
data-structures
binary-search-tree
easy
isro2009
24
votes
5
answers
6
GATE CSE 1996 | Question: 2.14
A binary search tree is generated by inserting in order the following integers: $50, 15, 62, 5, 20, 58, 91, 3, 8, 37, 60, 24$ The number of nodes in the left subtree and right subtree of the root respectively is $(4, 7)$ $(7, 4)$ $(8, 3)$ $(3, 8)$
Vasudevarnabmessi
answered
in
DS
Mar 18
by
Vasudevarnabmessi
27.7k
views
gate1996
data-structures
binary-search-tree
normal
40
votes
8
answers
7
GATE CSE 2005 | Question: 2
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
Vasudevarnabmessi
answered
in
DS
Mar 18
by
Vasudevarnabmessi
16.7k
views
gatecse-2005
data-structures
normal
abstract-data-type
0
votes
1
answer
8
binary search tree
Consider a binary search tree, while searching the key value 4, key values 1, 2, 3, 6, 8, 9, 10 and 11 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 value 4?
Bharat Bhushan
answered
in
DS
Mar 5
by
Bharat Bhushan
123
views
data-structures
binary-search-tree
0
votes
1
answer
9
TOPIC - Infix to postfix and prefix conversion
Convert the following infix expression to postfix and prefix A^B^C^D
[ Jiren ]
answered
in
DS
Feb 25
by
[ Jiren ]
123
views
infix-prefix
2
votes
1
answer
10
GATE CSE 2023 | Question: 3
Let $\textsf{SLLdel}$ be a function that deletes a node in a singly-linked list given a pointer to the node and a pointer to the head of the list. Similarly, let $\textsf{DLLdel}$ be another function that deletes a node in a doubly-linked list given a pointer to the node ... $\textsf{DLLdel}$ are $O(1)$ $\textsf{SLLdel}$ is $O(n)$ and $\textsf{DLLdel}$ is $O(1)$
DevUt
answered
in
DS
Feb 17
by
DevUt
1.8k
views
gatecse-2023
data-structures
linked-list
1-mark
3
votes
3
answers
11
GATE CSE 2023 | Question: 49
Consider a sequence $a$ of elements $a_{0}=1, a_{1}=5, a_{2}=7, a_{3}=8, a_{4}=9$, and $a_{5}=2$. The following operations are performed on a stack $S$ and a queue $Q,$ both of which are initially empty. $\textsf{push}$ the ... $S$. $\textsf{pop}$ an element from $S$. The top element of $S$ after executing the above operations is ______________.
Hira Thakur
answered
in
DS
Feb 16
by
Hira Thakur
930
views
gatecse-2023
data-structures
stack
numerical-answers
2-marks
2
votes
1
answer
12
GATE CSE 2023 | Question: 37
Consider the $\text{C}$ function $\text{foo}$ and the binary tree shown. typedef struct node { int val; struct node *left, *right; } node; int foo(node *p) { int retval; if (p == NULL) return 0; else { retval = p->val + foo(p->left) + foo(p->right); printf("%d ", ... $3 \;5\; 8\; 10\; 11\; 13$ $3 \;8 \;16 \;13\; 24\; 50$ $3\; 16\; 8\; 50\; 24\; 13$
Shaik Masthan
answered
in
DS
Feb 16
by
Shaik Masthan
918
views
gatecse-2023
data-structures
binary-tree
2-marks
1
vote
1
answer
13
GATE CSE 2023 | Question: 36
Let $A$ be a priority queue for maintaining a set of elements. Suppose $A$ is implemented using a max-heap data structure. The operation $\text{EXTRACT-MAX} (A)$ extracts and deletes the maximum element from $A$. The operation $\operatorname{INSERT}(A, key )$ inserts a new ... $O(1)$ whereas $\operatorname{INSERT}(A, k e y)$ runs in $O(\log (n))$.
akshaw
answered
in
DS
Feb 15
by
akshaw
995
views
gatecse-2023
data-structures
priority-queue
time-complexity
2-marks
40
votes
12
answers
14
GATE CSE 2015 Set 3 | Question: 25
Consider a binary tree T that has $200$ leaf nodes. Then the number of nodes in T that have exactly two children are ______.
Satyam258rt
answered
in
DS
Feb 13
by
Satyam258rt
17.9k
views
gatecse-2015-set3
data-structures
binary-tree
normal
numerical-answers
0
votes
1
answer
15
GATE CSE 2023 | Memory Based Question: 41
Which one of the following sequences when stored in an array at locations A[1],...,A[10] forms a max-heap? $23\; 17\; 10\; 6\; 13\; 14\; 1\; 5 \;9 \;12$ $23 \;14 \;19 \;1 \;10 \;13 \;16 \;12 \;7 \;5$ $23 \;17\; 14\; 6\; 13\; 10\; 1\; 5\; 7\; 15$ $23 \;17\; 14\; 7\; 13\; 10\; 1\; 5\; 6\; 12$
closed
Hira Thakur
answered
in
DS
Feb 6
by
Hira Thakur
474
views
memorybased-gatecse2023
goclasses
data-structures
binary-heap
0
votes
1
answer
16
TestBook testseries linkedList question
What does the following routine do on doubly linked list. M is some middle node address and N is a newly inserted node address. N → lptr = M ; N → rtptr = M → rptr ; N → lptr → rptr = N ; N → rptr → lptr = N ; Inserts a node to Right of M Left of M Right Most Left Most
Pranavpurkar
answered
in
DS
Jan 31
by
Pranavpurkar
91
views
data-structures
linked-list
0
votes
2
answers
17
back edge and no forward edge
Which does this sentence mean? In BFS of an undirected graph, there are no back edge and no forward edge.
supreetshukla
answered
in
DS
Jan 29
by
supreetshukla
2.0k
views
programming-in-c
data-structures
breadth-first-search
0
votes
1
answer
18
UPPCL AE 2018:65
Consider that $\text{N}$ distinct elements $(\text{N}>3)$ are inserted into an initially empty binary search tree $\text{(BST)}.$ Which of the following statements are true? None of the above The worst case height of the resulting $\text{BST}$ is ... $\text{BST}.$ Swapping the order of insertion of any two elements can always half the height of the resulting $\text{BST}.$
Sahil_Lather
answered
in
DS
Jan 28
by
Sahil_Lather
159
views
uppcl2018
data-structures
binary-search-tree
45
votes
8
answers
19
GATE CSE 2014 Set 3 | Question: 12
Consider the following rooted tree with the vertex labeled $P$ as the root: The order in which the nodes are visited during an in-order traversal of the tree is $SQPTRWUV$ $SQPTUWRV$ $SQPTWUVR$ $SQPTRUWV$
Souvik33
answered
in
DS
Jan 25
by
Souvik33
13.0k
views
gatecse-2014-set3
data-structures
tree
easy
54
votes
10
answers
20
GATE CSE 2014 Set 3 | Question: 42
Consider the C function given below. Assume that the array $listA$ contains $n (>0)$ elements, sorted in ascending order. int ProcessArray(int *listA, int x, int n) { int i, j, k; i = 0; j = n-1; do { k = (i+j)/2; if ... implementation of binary search. It will always find the maximum element in $listA$. It will return −$1$ even when $x$ is present in $listA$.
eliecher
answered
in
DS
Jan 24
by
eliecher
10.7k
views
gatecse-2014-set3
data-structures
array
easy
20
votes
6
answers
21
GATE CSE 2001 | Question: 2.16
What is the minimum number of stacks of size $n$ required to implement a queue of size $n$? One Two Three Four
Johnny1001
answered
in
DS
Jan 16
by
Johnny1001
22.1k
views
gatecse-2001
data-structures
easy
stack
queue
32
votes
4
answers
22
GATE CSE 1996 | Question: 1.12
Consider the following statements: First-in-first 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 ... $(ii)$ are true $(iii)$ and $(iv)$ are true $(ii)$ and $(iv)$ are true
Johnny1001
answered
in
DS
Jan 16
by
Johnny1001
11.8k
views
gate1996
data-structures
easy
queue
stack
linked-list
1
vote
7
answers
23
The maximum number of nodes on level i of a binary tree
Level of a node is distance from root to that node. For example, level of root is 1 and levels of left and right children of root is 2. The maximum number of nodes on level i of a binary tree is In the following answers, the operator '^' indicates power a) 2^i-1 b)2^i c)2^i+1 d)2^(i+1/2)
Johnny1001
answered
in
DS
Jan 15
by
Johnny1001
92.2k
views
binary-tree
data-structures
0
votes
0
answers
24
Tree
damz1499
asked
in
DS
Dec 29, 2022
by
damz1499
74
views
data-structures
binary-tree
probability
0
votes
1
answer
25
ZEAL TESTSERIES
Options: 10, 12,14, 16, 18, 20 20, 18, 16, 14, 12, 10 12, 10, 16, 14, 20, 18 NONE
DAWID15
asked
in
DS
Dec 22, 2022
by
DAWID15
170
views
test-series
zeal
0
votes
1
answer
26
Array P&DS | Time Complexity
What is the worst case time complexity of an efficient algorithm (in order of n) to get the last index for an actually filled element, in an array, given the condition that we may not fill the entire initialized array with elements, the array is initialized as “int a[n]; ” [Array may not be filled in a sorted order] O(n) O(1) O(log(n)) O($n^2$)
Souvik33
asked
in
DS
Dec 17, 2022
by
Souvik33
273
views
algorithms
time-complexity
array
1
vote
0
answers
27
DRDO CSE 2022 Paper 1 | Question: 26 (b)
Provide the correct data structures for the following: Asynchronous data transfer and accessing shared resource involve _________.
admin
asked
in
DS
Dec 15, 2022
by
admin
73
views
drdocse-2022-paper1
data-structures
1-mark
fill-in-the-blanks
1
vote
0
answers
28
DRDO CSE 2022 Paper 1 | Question: 26 (a)
Provide the correct data structures for the following: ________ is used for delimiter checking and recursion.
admin
asked
in
DS
Dec 15, 2022
by
admin
74
views
drdocse-2022-paper1
data-structures
stack
1-mark
fill-in-the-blanks
1
vote
1
answer
29
DRDO CSE 2022 Paper 1 | Question: 27
Find the number of binary tree(s) with $3$ nodes (i.e., $\text{A, B,}$ and $\text{C})$ which when traversed by pre-order gives the sequence $\textbf{C B A}$. You also need to draw each such tree.
admin
asked
in
DS
Dec 15, 2022
by
admin
81
views
drdocse-2022-paper1
data-structures
binary-tree
5-marks
descriptive
1
vote
0
answers
30
DRDO CSE 2022 Paper 1 | Question: 28
If the maximum height of a binary tree is $\mathrm{N},$ then how many number of nodes will there be?
admin
asked
in
DS
Dec 15, 2022
by
admin
55
views
drdocse-2022-paper1
data-structures
binary-tree
4-marks
descriptive
1
vote
1
answer
31
DRDO CSE 2022 Paper 1 | Question: 29
Five items $\text{A, B, C, D, E}$ are pushed onto a stack, one after other starting from item $\mathrm{A}$. The stack is then popped by three items, and each item is inserted into a queue. Next, two items are deleted from the queue, ... deleted items are pushed back onto the stack. Now, one item is popped from the stack. Which item is at the top of the stack.
admin
asked
in
DS
Dec 15, 2022
by
admin
131
views
drdocse-2022-paper1
data-structures
stack
5-marks
descriptive
1
vote
0
answers
32
DRDO CSE 2022 Paper 1 | Question: 30
If the prefix traversal order of a tree is $*+\mathbf{a} \mathbf{b}-\mathbf{c} \mathbf{d}$. Then, find the equivalent postfix order of the that tree.
admin
asked
in
DS
Dec 15, 2022
by
admin
72
views
drdocse-2022-paper1
data-structures
tree-traversal
3-marks
descriptive
0
votes
1
answer
33
DSA
Given two max heap, one of size n and other m. Calculate the time complexity of merging them to get a max heap.
shub2204
asked
in
DS
Dec 5, 2022
by
shub2204
292
views
heap
time-complexity
merging
0
votes
1
answer
34
Random
Consider a 15 element min-heap which follows these conditions. right child of root is7 and one child of node 3 is 9. Calculate how many min heap possible?
shub2204
asked
in
DS
Nov 30, 2022
by
shub2204
227
views
data-structures
heap
combinatory
0
votes
0
answers
35
Data structures and algorithms
Consider the last four digits of your register number and form the following numbers: 1. first digit 2. second digit 3. third digit 4. fourth digit 5. 2 digit number with the first two digits 6. 2 digit number with the last two digits ... inserted into a hash table whose description is given above and the contents of the table after insertion are to be clearly given.
Karthi2003
asked
in
DS
Nov 7, 2022
by
Karthi2003
202
views
data-structures
hashing
linear-probing
0
votes
1
answer
36
Ace Test Series Data Structure Q9
Which data structure would be most appropriate to implement a collection of values with the following 3 characteristics Singly link list with head and tail pointer Doubly link list with only head pointer Binary tree Array
Souvik33
asked
in
DS
Nov 2, 2022
by
Souvik33
266
views
data-structures
linked-list
test-series
stack
queue
2
votes
0
answers
37
igate test series
AVL tree is binary search tree with additional property that difference between height of left sub-tree and right sub-tree of any node can’t be more than 1 if n is the number of nodes in a AVL tree . The maximum value of n for which the difference between the minimum height and maximum height of AVL tree is <2 _________ ?
jugnu1337
asked
in
DS
Nov 1, 2022
by
jugnu1337
187
views
i-gate-test-series
programming
binary-search-tree
avl-tree
0
votes
0
answers
38
Ace Academy Test Series Qn#7
A hash function h maps 16-bit inputs to 8 bit hash values. What is the largest k such that in any set of 1000 inputs, there are atleast k inputs that h maps to the same hash value? 3 4 10 64
Souvik33
asked
in
DS
Oct 30, 2022
by
Souvik33
175
views
ace-test-series
data-structures
hashing
pigeonhole-principle
discrete-mathematics
0
votes
0
answers
39
Ace Academy Test Series
A hash function h maps 16-bit inputs to 8 bit hash values. What is the largest k such that in any set of 1000 inputs, there are atleast k inputs that h maps to the same hash value? 3 4 10 64
closed
Souvik33
asked
in
DS
Oct 30, 2022
by
Souvik33
102
views
ace-test-series
data-structures
hashing
pigeonhole-principle
discrete-mathematics
0
votes
1
answer
40
Self-Doubt: Stack Overflow in LinkedList
Can there be “Stack Overflow” in Linked list Implementation of stack? If Yes, how?
Abhrajyoti00
asked
in
DS
Oct 29, 2022
by
Abhrajyoti00
209
views
stack
data-structures
linked-list
To see more, click for all the
questions in this category
.
Subscribe to GATE CSE 2023 Test Series
Subscribe to GO Classes for GATE CSE 2023
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
Central Pollution Control Board CPCB Various Post Recruitment 2023
MP Rajya Sahkari Apex Bank Various Post Recruitment 2023
NITIE MUMBAI throgh GATE
PGCIL recruitment 2023 – Apply Online For 138 Posts through GATE
Admission guidance for GATE CSE 2023
Subjects
All categories
General Aptitude
(2.6k)
Engineering Mathematics
(9.4k)
Digital Logic
(3.3k)
Programming and DS
(5.9k)
Programming
(3.9k)
DS
(1.9k)
Algorithms
(4.6k)
Theory of Computation
(6.7k)
Compiler Design
(2.3k)
Operating System
(5.0k)
Databases
(4.6k)
CO and Architecture
(3.8k)
Computer Networks
(4.7k)
Non GATE
(1.3k)
Others
(2.5k)
Admissions
(655)
Exam Queries
(848)
Tier 1 Placement Questions
(17)
Job Queries
(77)
Projects
(9)
Unknown Category
(866)
Recent questions and answers in DS
Recent Blog Comments
Please upload updated previous year question...
The last hardcopy that was made was for GATE 2022...
overall only 3 post .no post for gen male
for gen GS in the range of 720-750 approx.
can we get 2023 hark copy from amazon?