Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Recent questions tagged data-structures
0
votes
5
answers
1591
What is the level number of an element present in an array of n integers interpreted as a complete binary tree?
If I am given an array $X$ of $n$ distinct integers which is interpreted as a complete binary tree, so if the parent is at index $i$, then it's left child would be at ind...
radha gogia
1.7k
views
radha gogia
asked
Sep 30, 2015
DS
binary-tree
data-structures
+
–
0
votes
1
answer
1592
What is the no. of nodes in the tree that has exactly one child?
In a binary tree with n nodes every node has an odd no. of descendants. Every node is considered to be its own descendant. What is the no. of nodes in the tree that has exactly one child? (a) 0 (b) 1 (c) (n-1)/ 2 (d) n-1
In a binary tree with n nodes every node has an odd no. of descendants. Every node is considered to be its own descendant. What is the no. of nodes in the tree that has e...
IgnitorSandeep
1.4k
views
IgnitorSandeep
asked
Sep 28, 2015
Programming in C
data-structures
+
–
1
votes
2
answers
1593
How is a stack implemented by a priority queue ?
A priority queue Q is used to implement a stack S that stores characters .PUSH(C) is implemented as Insert(Q,C,K) where K is an appropriate integer key chosen by the implementation .POP is implementd as DELETEMIN(Q) . For a sequence of PUSH ... case , while this element would be at the bottom of the stack so then how will I be able to do this ?
A priority queue Q is used to implement a stack S that stores characters .PUSH(C) is implemented as Insert(Q,C,K) where K is an appropriate integer key chosen by the i...
radha gogia
2.6k
views
radha gogia
asked
Sep 26, 2015
DS
data-structures
+
–
0
votes
6
answers
1594
What is the approach to find preorder from given inorder?
The in-order traversal of a tree resulted in FBGADCE. Then pre-order traversal would result in. a)FGBDECA b)ABFGCDE C)BFGCDEA d)AFGBDEC
The in-order traversal of a tree resulted in FBGADCE. Then pre-order traversal would result in.a)FGBDECAb)ABFGCDEC)BFGCDEAd)AFGBDEC
Umang Raman
5.6k
views
Umang Raman
asked
Sep 25, 2015
Programming in C
data-structures
+
–
9
votes
9
answers
1595
ISRO2014-73
How many different trees are there with four nodes $\text{A, B, C}$ and $\text{D}?$ $30$ $60$ $90$ $120$
How many different trees are there with four nodes $\text{A, B, C}$ and $\text{D}?$$30$$60$$90$$120$
ajit
14.7k
views
ajit
asked
Sep 23, 2015
DS
isro2014
data-structures
tree
combinatory
+
–
5
votes
5
answers
1596
ISRO2014-36
Consider a standard Circular Queue implementation (which has the same condition for Queue Full and Queue Empty) whose size is $11$ and the elements of the queue are $q[0], q[1], \ldots q[10]$. The front and rear pointers are initialized to point at $q[2]$. In which position will the ninth element be added? $q[0]$ $q[1]$ $q[9]$ $q[10]$
Consider a standard Circular Queue implementation (which has the same condition for Queue Full and Queue Empty) whose size is $11$ and the elements of the queue are $q[0]...
ajit
8.6k
views
ajit
asked
Sep 23, 2015
DS
data-structures
queue
isro2014
+
–
2
votes
5
answers
1597
ISRO2008-76
The minimum number of fields with each node of doubly linked list is 1 2 3 4
The minimum number of fields with each node of doubly linked list is1234
ajit
19.6k
views
ajit
asked
Sep 20, 2015
DS
isro2008
data-structures
linked-list
+
–
0
votes
3
answers
1598
why is the time complexity of operations like isempty, isfull, size, delete stack takes constant time ?
According to me when we perform the above operations we have to traverse the entire list so then why does it all take constant time ?
radha gogia
4.0k
views
radha gogia
asked
Jul 22, 2015
Programming in C
data-structures
+
–
2
votes
1
answer
1599
How does concatenation of 2 circular linked lists takes constant time ?
I am not getting that when head pointer has no information regarding the tail pointer then how is it that circular linked list will have a constant time for its concatenation with another circular linked list , wouldn't it take same time if we perform concatenation on a single or double linked list .
I am not getting that when head pointer has no information regarding the tail pointer then how is it that circular linked list will have a constant time for its concatena...
radha gogia
2.9k
views
radha gogia
asked
Jul 22, 2015
Programming in C
data-structures
+
–
12
votes
6
answers
1600
Consider a hash table with ‘m’ slots that uses chaining for collision resolution.
Consider a hash table with $m$ slots that uses chaining for collision resolution. The table is initially empty. What is the probability that after 4 keys are inserted that at least a chain of size 3 is created? (Assume simple uniform ... $m^{–3} (m – 1)$ $3m^{–1}$
Consider a hash table with $m$ slots that uses chaining for collision resolution. The table is initially empty. What is the probability that after 4 keys are inserted tha...
radha gogia
7.8k
views
radha gogia
asked
Jul 20, 2015
Algorithms
data-structures
hashing
+
–
0
votes
1
answer
1601
Postfix expression for the following image ?
q.26 : I do not understand the output . Why are real , integer and to coming?
q.26 : I do not understand the output . Why are real , integer and to coming?
prasitamukherjee
559
views
prasitamukherjee
asked
Jul 16, 2015
DS
data-structures
stack
infix-prefix
+
–
0
votes
1
answer
1602
How to implement stack using a queue ?
I am unable to understand the implementation of stack using queue , I understood queue implementation using stack but not this one , I searched for a video lecture too but found for implementation of queue only , so plz help in making me this understand .
I am unable to understand the implementation of stack using queue , I understood queue implementation using stack but not this one , I searched for a video lecture too bu...
radha gogia
576
views
radha gogia
asked
Jul 13, 2015
Programming in C
data-structures
+
–
4
votes
4
answers
1603
QUEUES
A circular array based queue $q$ is capable of holding $7$ elements. After execution of the following code, find the element at index $'1'$, if the array is initially empty and array has indices from $0$ to $6$. for (x=1; x<=6; x++ ... ) { q.dequeue (); q.enqueue (q.dequeue ()); } Assume enqueue & dequeue are circular queue operations for insertion and deletion respectively.
A circular array based queue $q$ is capable of holding $7$ elements. After execution of the following code, find the element at index $'1'$, if the array is initially emp...
supraja
9.6k
views
supraja
asked
Jun 27, 2015
DS
data-structures
queue
+
–
4
votes
3
answers
1604
UGC NET CSE | June 2014 | Part 2 | Question: 40
What is the maximum number of parenthesis that will appear on the stack at any one time for parenthesis expression given by $( ( ) \; ( ( ) ) \; ( ( ) ) )$ $2$ $3$ $4$ $5$
What is the maximum number of parenthesis that will appear on the stack at any one time for parenthesis expression given by$( ( ) \; ( ( ) ) \; ( ( ) ) ...
Shimpy Goyal
7.9k
views
Shimpy Goyal
asked
Jun 26, 2015
DS
ugcnetcse-june2014-paper2
data-structures
stack
+
–
5
votes
1
answer
1605
UGC NET CSE | December 2013 | Part 2 | Question: 36
How many edges are there in a forest of t-trees containing a total of n vertices ? n + t n – t n ∗ t nt
How many edges are there in a forest of t-trees containing a total of n vertices ?n + tn – tn ∗ tnt
Shimpy Goyal
3.6k
views
Shimpy Goyal
asked
Jun 26, 2015
Graph Theory
ugcnetcse-dec2013-paper2
data-structures
tree
+
–
0
votes
3
answers
1606
why do we not apply Binary search for insertion in the heap ?
however number of comparisions in binary search=O(loglogn) and in linear search it is O(logn), time complexity in case of binary search- O(logn) and in case of linear it is also O(logn)
however number of comparisions in binary search=O(loglogn) and in linear search it is O(logn),time complexity in case of binary search- O(logn) and in case of linear it i...
anurag_am
904
views
anurag_am
asked
Jun 18, 2015
DS
data-structures
algorithms
+
–
8
votes
2
answers
1607
number of comparision in searching in BST
Consider the following Binary Search Tree 10 / \ 5 20 / / \ 4 15 30 / 11 If we randomly search one of the keys present in above BST, what would be the expected number of comparisons? (A) 2.75 (B) 2.25 (C) 2.57 (D) 3.25
Consider the following Binary Search Tree 10 / \ 5 20 / / \ 4 15 30 ...
anurag_am
18.5k
views
anurag_am
asked
Jun 17, 2015
DS
data-structures
binary-tree
+
–
2
votes
2
answers
1608
Preorder to Inorder conversion for binary tree
how to convert into inorder traversal if preorder traversal of binary tree is given in the problem ? exaplain using example.
how to convert into inorder traversal if preorder traversal of binary tree is given in the problem ? exaplain using example.
anurag_am
6.0k
views
anurag_am
asked
Jun 15, 2015
DS
data-structures
+
–
0
votes
2
answers
1609
Give an algorithm to finding duplicate parenthesis in a expression ?
suppose expression is like : ((a+b)+((c+d))), so how to find duplicate parenthesis in the given expression ?
suppose expression is like : ((a+b)+((c+d))), so how to find duplicate parenthesis in the given expression ?
anurag_am
1.3k
views
anurag_am
asked
Apr 29, 2015
DS
data-structures
stack
descriptive
+
–
0
votes
1
answer
1610
Optimal binary search tree
Given the following table of data what are the minimum expected no.of comparisons required for an Optimal i 0 1 2 3 4 Pi 3/16 3/16 1/16 1/16 Qi 2/16 3/16 1/16 1/16 1/16 BST that can be constructed with the given data
Given the following table of data what are the minimum expected no.of comparisons required for an Optimali01234Pi 3/163/161/161/16Qi2/163/161/161/161/16BST that can be co...
supraja
4.3k
views
supraja
asked
Apr 28, 2015
DS
data-structures
binary-search-tree
numerical-answers
+
–
0
votes
1
answer
1611
Time com
Consider a binary tree having 'n' elements or 'n' nodes the tree is organized in such a way that at every level 'i' there are 'i' nodes assuming root to be at level 1 the height or depth of binary tree is O(......)
Consider a binary tree having 'n' elements or 'n' nodes the tree is organized in such a way that at every level 'i' there are 'i' nodes assuming root to be at level 1 the...
supraja
554
views
supraja
asked
Apr 18, 2015
DS
binary-tree
time-complexity
data-structures
+
–
0
votes
1
answer
1612
If memory for the run-time stack is only 150 cells (words) how big can N be in Factorial(N) before encountering Stack overflow?
options are:a)24b)15c)66d)50
soorajchn
5.5k
views
soorajchn
asked
Mar 14, 2015
Programming in C
data-structures
stack
+
–
42
votes
12
answers
1613
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 ______.
Consider a binary tree T that has $200$ leaf nodes. Then the number of nodes in T that have exactly two children are ______.
go_editor
24.3k
views
go_editor
asked
Feb 14, 2015
DS
gatecse-2015-set3
data-structures
binary-tree
normal
numerical-answers
+
–
32
votes
4
answers
1614
GATE CSE 2015 Set 3 | Question: 19
Consider the following array of elements. $\langle 89, 19, 50, 17, 12, 15, 2, 5, 7, 11, 6, 9, 100 \rangle$ The minimum number of interchanges needed to convert it into a max-heap is $4$ $5$ $2$ $3$
Consider the following array of elements.$\langle 89, 19, 50, 17, 12, 15, 2, 5, 7, 11, 6, 9, 100 \rangle$The minimum number of interchanges needed to convert it into a ma...
go_editor
9.1k
views
go_editor
asked
Feb 14, 2015
DS
gatecse-2015-set3
data-structures
binary-heap
easy
+
–
36
votes
4
answers
1615
GATE CSE 2015 Set 3 | Question: 17
Given that hash table $T$ with $25$ slots that stores $2000$ elements, the load factor $a$ for $T$ is _________.
Given that hash table $T$ with $25$ slots that stores $2000$ elements, the load factor $a$ for $T$ is _________.
go_editor
9.3k
views
go_editor
asked
Feb 14, 2015
DS
gatecse-2015-set3
data-structures
hashing
easy
numerical-answers
+
–
25
votes
8
answers
1616
GATE CSE 2015 Set 3 | Question: 13
While inserting the elements $71, 65, 84, 69, 67, 83$ in an empty binary search tree (BST) in the sequence shown, the element in the lowest level is $65$ $67$ $69$ $83$
While inserting the elements $71, 65, 84, 69, 67, 83$ in an empty binary search tree (BST) in the sequence shown, the element in the lowest level is$65$$67$$69$$83$
go_editor
7.4k
views
go_editor
asked
Feb 14, 2015
DS
gatecse-2015-set3
data-structures
binary-search-tree
easy
+
–
27
votes
6
answers
1617
GATE CSE 2015 Set 3 | Question: 12
The result evaluating the postfix expression $10 \ 5 + 60 \ 6 / * 8 -$ is $284$ $213$ $142$ $71$
The result evaluating the postfix expression $10 \ 5 + 60 \ 6 / * 8 -$ is $284$$213$$142$$71$
go_editor
13.0k
views
go_editor
asked
Feb 14, 2015
DS
gatecse-2015-set3
data-structures
stack
normal
+
–
94
votes
5
answers
1618
GATE CSE 2015 Set 1 | Question: 40
An algorithm performs $(\log N)^{\frac{1}{2}}$ find operations , $N$ insert operations, $(\log N)^{\frac{1}{2}}$ delete operations, and $(\log N)^{\frac{1}{2}}$ decrease-key operations on a set of data ... if the goal is to achieve the best total asymptotic complexity considering all the operations? Unsorted array Min - heap Sorted array Sorted doubly linked list
An algorithm performs $(\log N)^{\frac{1}{2}}$ find operations , $N$ insert operations, $(\log N)^{\frac{1}{2}}$ delete operations, and $(\log N)^{\frac{1}{2}}$ decrease-...
makhdoom ghaya
23.8k
views
makhdoom ghaya
asked
Feb 13, 2015
Algorithms
gatecse-2015-set1
algorithms
data-structures
normal
time-complexity
+
–
28
votes
1
answer
1619
GATE CSE 2015 Set 1 | Question: 32
Consider a max heap, represented by the array: $40, 30, 20, 10, 15, 16, 17, 8, 4$ ... $40, 30, 20, 10, 35, 16, 17, 8, 4, 15$ $40, 35, 20, 10, 15, 16, 17, 8, 4, 30$
Consider a max heap, represented by the array: $40, 30, 20, 10, 15, 16, 17, 8, 4$.$$\begin{array}{|l|l|}\hline \text{Array index} & \text{1} & \text{2} & \text{3} & \...
makhdoom ghaya
7.0k
views
makhdoom ghaya
asked
Feb 13, 2015
DS
gatecse-2015-set1
data-structures
binary-heap
easy
+
–
23
votes
4
answers
1620
GATE CSE 2015 Set 1 | Question: 25
The height of a tree is the length of the longest root-to-leaf path in it. The maximum and minimum number of nodes in a binary tree of height $5$ are $63$ and $6$, respectively $64$ and $5$, respectively $32$ and $6$, respectively $31$ and $5$, respectively
The height of a tree is the length of the longest root-to-leaf path in it. The maximum and minimum number of nodes in a binary tree of height $5$ are$63$ and $6$, respect...
makhdoom ghaya
11.1k
views
makhdoom ghaya
asked
Feb 13, 2015
DS
gatecse-2015-set1
data-structures
binary-tree
easy
+
–
Page:
« prev
1
...
49
50
51
52
53
54
55
56
57
58
59
60
next »
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register