Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Recent questions tagged data-structures
0
votes
1
answer
1201
Binary Tree
monty
314
views
monty
asked
Jan 30, 2017
DS
data-structures
binary-search-tree
+
–
0
votes
1
answer
1202
MadeEasy Subject Test: Programming & DS - Linked Lists
vaishali jhalani
423
views
vaishali jhalani
asked
Jan 30, 2017
DS
made-easy-test-series
data-structures
linked-list
time-complexity
+
–
1
votes
1
answer
1203
Ace Test Series: Programming & DS - Binary Tree
Sonali Rangwani
344
views
Sonali Rangwani
asked
Jan 30, 2017
DS
ace-test-series
data-structures
binary-tree
+
–
3
votes
0
answers
1204
TestBook TestSeries
in a binary search tree, the key with value 5 was searched after traversing nodes with values 1, 3, 4, 6, 7, 8, 9 not necessarily in this order. Lets P is the probability that 3rd element on the search path beginning from root is either 3 or 8, ... are the number of different orders possible in which given nodes can be traversed before finding node with value 5. Find N ∕ 10 + P
in a binary search tree, the key with value 5 was searched after traversing nodes with values 1, 3, 4, 6, 7, 8, 9 not necessarily in this order. Lets P is the probability...
vnc
467
views
vnc
asked
Jan 29, 2017
Programming in C
data-structures
binary-search-tree
+
–
0
votes
1
answer
1205
AVL trees
Arnabi
746
views
Arnabi
asked
Jan 28, 2017
Programming in C
avl-tree
data-structures
time-complexity
+
–
0
votes
0
answers
1206
Hashing Question
Why 4 is multiplied in part. In the solution.
Why 4 is multiplied in part. In the solution.
Tendua
849
views
Tendua
asked
Jan 26, 2017
Programming in C
hashing
data-structures
+
–
5
votes
6
answers
1207
column major in 3d array
Consider 3 dimensional Array A[90] [30] [40] stored in linear array in column major order. If the base address starts at 10. The location of A[20] [20] [30] is __________ . [Assume the first element is stored at A[1][1][1] and each element take 1 B].
Consider 3 dimensional Array A[90] [30] [40] stored in linear array in column major order. If the base address starts at 10. The location of A[20] [20] [30] is __________...
Pankaj Joshi
15.9k
views
Pankaj Joshi
asked
Jan 26, 2017
Programming in C
array
programming-in-c
data-structures
+
–
0
votes
1
answer
1208
Made easy
Consider we have an algorithm which generate preorder of any tree in Ο(log n) time, we have to create a Binary Search Tree with n distinct element. Which of the following will represents the worst case time complexity ? Ο(n) Ο(n log n) Ο(n2) Ο(1)
Consider we have an algorithm which generate preorder of any tree in Ο(log n) time, we have to create a Binary Search Tree with n distinct element. Which of the followin...
Pankaj Joshi
448
views
Pankaj Joshi
asked
Jan 25, 2017
DS
data-structures
binary-search-tree
time-complexity
made-easy-test-series
+
–
2
votes
1
answer
1209
Stack Doubt
The question basically says no. of different outputs produced for given sequence of input (1,2,...,n) I thought in terms of push - pop pairs but cant arrive at the answer @arjun sir , @bikram sir
The question basically says no. of different outputs produced for given sequence of input (1,2,...,n)I thought in terms of push - pop pairs but cant arrive at the answer ...
Harsh181996
969
views
Harsh181996
asked
Jan 25, 2017
Programming in C
stack
data-structures
+
–
1
votes
1
answer
1210
Binary search tree construction Doubt
What is the worst case time complexity to construct a binary search tree.??? Now i know ,that if a BST is left or right-skewed, searching an element takes O(n) time.so suppose i want to insert 10,25,30,35,40 in a bst.. it will be completely right skewed.. So when ... so overall work =0+1+2+...+(n-1)=N(n-1)/2= O(n2) Am i correct here?? or it is O(nlogn)
What is the worst case time complexity to construct a binary search tree.???Now i know ,that if a BST is left or right-skewed, searching an element takes O(n) time.so sup...
Aboveallplayer
2.2k
views
Aboveallplayer
asked
Jan 24, 2017
DS
binary-search-tree
data-structures
+
–
0
votes
1
answer
1211
Test by Bikram | Mock GATE | Test 2 | Question: 37
Which of these statements is not true about an $AVL$ tree $T$ containing $n$ nodes? Rotations may be required during key insertion to keep $T$ balanced. The height of $T$ cannot exceed $1.5$ * $\log 2^{n}$ . And It is ... $ can be used to perform order statistic searches in $O$\left ( \lg n \right )$ asymptotic algorithmic complexity.
Which of these statements is not true about an $AVL$ tree $T$ containing $n$ nodes?Rotations may be required during key insertion to keep $T$ balanced.The height of $T$ c...
Bikram
526
views
Bikram
asked
Jan 24, 2017
GATE
tbb-mockgate-2
data-structures
tree
avl-tree
+
–
2
votes
3
answers
1212
Test by Bikram | Mock GATE | Test 2 | Question: 35
Consider the following possible data structures for a set of $n$ distinct integers. A min-heap An array of length $n$ sorted in increasing order A balanced binary search tree For which of these data structures, the number of steps needed to find and remove ... element in $0 (\log n)$ time in the worst case? I and III II and III I and II II only
Consider the following possible data structures for a set of $n$ distinct integers.A min-heapAn array of length $n$ sorted in increasing orderA balanced binary search tre...
Bikram
1.9k
views
Bikram
asked
Jan 24, 2017
DS
tbb-mockgate-2
data-structures
binary-heap
time-complexity
+
–
1
votes
1
answer
1213
Test by Bikram | Mock GATE | Test 2 | Question: 32
Suppose that six keys are inserted into an unbalanced binary search tree in the following order: $4, 6, 3, 8, 2$, and $5$ ... without adding another level to the tree. I and II only I and III only II and III only I, II, and III
Suppose that six keys are inserted into an unbalanced binary search tree in the following order: $4, 6, 3, 8, 2$, and $5$.Then which of the following statements is/are co...
Bikram
329
views
Bikram
asked
Jan 24, 2017
DS
tbb-mockgate-2
data-structures
binary-search-tree
tree
+
–
3
votes
2
answers
1214
Test by Bikram | Mock GATE | Test 2 | Question: 27
Let $T$ be a depth-first search tree of a connected undirected graph $G$. For each vertex $v$ of $T$, Let pre$\left ( v \right )$ be the number of nodes visited up to and including $v$ during a preorder traversal of $T$ ... is the lowest common ancestor of $u$ and $v$ in $T$, then $w = u$. II only III only I and II II and III
Let $T$ be a depth-first search tree of a connected undirected graph $G$. For each vertex $v$ of $T$,Let pre$\left ( v \right )$ be the number of nodes visited up to and ...
Bikram
791
views
Bikram
asked
Jan 24, 2017
GATE
tbb-mockgate-2
data-structures
graph-algorithms
depth-first-search
+
–
2
votes
2
answers
1215
Test by Bikram | Mock GATE | Test 2 | Question: 24
Which of the following expressions evaluates to the largest number? The prefix expression $+ $*$ - 2 3 5 7$ The postfix expression $2 3 + 5 $*$ 7 -$ The infix expression $\left ( 2+3 \right )$ * $\left ( 5-7 \right )$ The postfix expression $2$ $3$ + $5$ $7$ $-$ *
Which of the following expressions evaluates to the largest number?The prefix expression $+ $*$ - 2 3 5 7$The postfix expression $2 3 + 5 $*$ 7 -$The infix expression ...
Bikram
508
views
Bikram
asked
Jan 24, 2017
DS
tbb-mockgate-2
data-structures
infix-prefix
+
–
1
votes
2
answers
1216
Test by Bikram | Mock GATE | Test 2 | Question: 20
Given a binary search tree $T$, what is the path from $a$ node $x$ to its successor $y$, assuming that both $x$ and $y$ exist in $T$? if $x$ has a right child, then $y$ is the right child of $x$; otherwise, $y$ is the parent of $x$ ... $y$ is the parent of $x$; otherwise, $y$ is the parent of $x's$ first ancestor $z$ such that $z$ is a left child
Given a binary search tree $T$, what is the path from $a$ node $x$ to its successor $y$, assuming that both $x$ and $y$ exist in $T$?if $x$ has a right child, then $y$ is...
Bikram
471
views
Bikram
asked
Jan 24, 2017
GATE
tbb-mockgate-2
data-structures
tree
binary-tree
binary-search-tree
+
–
1
votes
0
answers
1217
Loop invariants [GateBook]
biranchi
520
views
biranchi
asked
Jan 24, 2017
Programming in C
programming
datas
data-structures
algorithms
+
–
1
votes
1
answer
1218
MadeEasy CBT 2017: Programming & DS - Trees
Devwritt
1.6k
views
Devwritt
asked
Jan 22, 2017
DS
made-easy-test-series
cbt-2017
data-structures
tree
+
–
0
votes
1
answer
1219
Testbook
#plz check?? i think its 7 ??
#plz check?? i think its 7 ??
Hradesh patel
439
views
Hradesh patel
asked
Jan 22, 2017
DS
data-structures
binary-heap
numerical-answers
testbook-test-series
+
–
0
votes
0
answers
1220
Made Easy FLT1 Circular Queue
Doubt: dequeue really deletes the element or just moves the pointer? I'm not getting the answer.
Doubt: dequeue really deletes the element or just moves the pointer? I'm not getting the answer.
target2017
952
views
target2017
asked
Jan 21, 2017
DS
data-structures
queue
circular-queue
+
–
1
votes
1
answer
1221
MadeEasy Subject Test: Programming & DS - Linked Lists
jatinmittal199510
639
views
jatinmittal199510
asked
Jan 21, 2017
DS
made-easy-test-series
linked-list
data-structures
+
–
0
votes
0
answers
1222
MadeEasy Subject Test: Programming & DS - Binary Search Tree
vaishali jhalani
419
views
vaishali jhalani
asked
Jan 20, 2017
DS
made-easy-test-series
data-structures
linked-list
time-complexity
+
–
1
votes
1
answer
1223
MadeEasy Subject Test: Algorithms - Time Complexity
A program takes input of a binary tree with N nodes and computes a function f(x)=max height of left subtree-max height of right subtree what is the time complexity?
A program takes input of a binary tree with N nodes and computes a function f(x)=max height of left subtree-max height of right subtreewhat is the time complexity?
Aboveallplayer
933
views
Aboveallplayer
asked
Jan 19, 2017
DS
data-structures
binary-tree
time-complexity
made-easy-test-series
+
–
0
votes
0
answers
1224
MadeEasy Subject Test: Programming & DS - Stack
A priority queue is used to implement a stack efficiently. Push(C) is implemented as insert 'C'. Pop is implemented as a delete minimum element. For a sequence of operations, the keys chosen are in Strictly decreasing order. How?
A priority queue is used to implement a stack efficiently. Push(C) is implemented as insert 'C'. Pop is implemented as a delete minimum element. For a sequence of operati...
pranjalgennext
459
views
pranjalgennext
asked
Jan 19, 2017
DS
made-easy-test-series
data-structures
stack
+
–
1
votes
2
answers
1225
Virtual Gate Test Series: Programming & DS - Infix Notation
What we can do if the unary operator comes in infix notation while converting it into postfix/prefix notations? For example, this $a = -b+c*d/e+f↑g↑h-i*j$
What we can do if the unary operator comes in infix notation while converting it into postfix/prefix notations? For example, this $a = -b+c*d/e+f↑g↑h-i*j$
smartmeet
1.0k
views
smartmeet
asked
Jan 18, 2017
DS
data-structures
stack
infix-prefix
virtual-gate-test-series
+
–
2
votes
1
answer
1226
Virtual Gate Test Series: Programming & DS - Tree
The minimum number of vertices having degree $1$ in a tree of at least $10$ vertices is ______________. If we consider this question, then the first answer comes in our mind is $'2',$ right? But what if Tree isn't binary? if the root node has $9$ leaf nodes, so all those nodes having degree $1,$ right$?$ So the answer could be$:9$
The minimum number of vertices having degree $1$ in a tree of at least $10$ vertices is ______________.If we consider this question, then the first answer comes in our mi...
smartmeet
468
views
smartmeet
asked
Jan 18, 2017
DS
data-structures
tree
virtual-gate-test-series
+
–
4
votes
1
answer
1227
Time to build a heap
If you are given a sorted list with n elements in ascending order. Then what will be the Time complexity to build a Min heap from the given array?
If you are given a sorted list with n elements in ascending order. Then what will be the Time complexity to build a Min heap from the given array?
Gaurab Ghosh
1.5k
views
Gaurab Ghosh
asked
Jan 18, 2017
DS
data-structures
binary-heap
time-complexity
+
–
0
votes
1
answer
1228
testbook
is it correct >>??
is it correct >>??
focus _GATE
340
views
focus _GATE
asked
Jan 18, 2017
Programming in C
testbook-test-series
test-series
data-structures
+
–
2
votes
2
answers
1229
MadeEasy Subject Test: Programming & DS - Binary Tree
Consider the following program: void find(struct Node *node) { struct Node *ptr,*q; q = (struct Node *)malloc(sizeof(struct Node)); q->left = NULL; q->right = NULL; if(node == NULL) return; find(nod->left); ... to the above function, by main function the sum of all the keys in the resultant tree produced by find() is given by___?
Consider the following program:void find(struct Node *node){struct Node *ptr,*q;q = (struct Node *)malloc(sizeof(struct Node));q->left = NULL;q->right = NULL;if(node == N...
firki lama
1.9k
views
firki lama
asked
Jan 17, 2017
DS
made-easy-test-series
data-structures
binary-tree
+
–
3
votes
1
answer
1230
quadratic probing collison loop count??
Given the input sequence {11,33,43,79,19} and hash table of size 10 with the hash function h(k)=k mod 10. If hash tables uses quadratic probing,the number of collisions occured while mapping the given sequence is?
Given the input sequence {11,33,43,79,19} and hash table of size 10 with the hash function h(k)=k mod 10. If hash tables uses quadratic probing,the number of collisions o...
firki lama
1.2k
views
firki lama
asked
Jan 17, 2017
DS
hashing
data-structures
+
–
Page:
« prev
1
...
36
37
38
39
40
41
42
43
44
45
46
...
60
next »
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register