Recent questions tagged data-structures

0 votes
2 answers
1411
how to merge two binary max heaps ?size of first heap is m+n and size of second heap is nand also find the complexity.
0 votes
1 answer
1412
how to decide height , depth and level of treeand no. of internal nodes in treesome books take root as internal nodeheight as no. of edges b/w root and leaf(longest path)...
5 votes
3 answers
1413
Keys $9,19,29,39,49,59,69$ are inserted into a hash Table of size $10$ $(0-9)$ using the hash function $H = k mod 10$ and Quadratic Probing is used for collision resoluti...
3 votes
1 answer
1414
A binary tree has 127 nodes. Which of the following is an invalid height for this tree ?$a). 16 $$b). 6$$c). 21$$d). 43$
1 votes
1 answer
1415
Is any operations in stack array implementation is linear time complexity?If there what is operation and explain abt that?
2 votes
2 answers
1416
A max heap stores unique digits from 1 to 100 in an array.(total 100 elements)What is the maximum possible index number for element 92 ?
4 votes
1 answer
1418
Consider a hash table of size $m = 10000$ and the hash function $ h(k) = \lfloor m (KA \bmod 1) ' \rfloor$ for $A= \frac{(\sqrt{5}-1}{2}$ . The location to the key $k = ...
1 votes
2 answers
1419
the time required to find 7th smallest element in min heap of size n vertices? solve and plz explain how?
2 votes
1 answer
1423
Which one of the following array represents a binary max-heap?[26, 13, 17, 14, 11, 9, 15][26, 15, 14, 17, 11, 9, 13][26, 15, 17, 14, 11, 9, 13][26, 15, 13, 14, 11, 9, 17]...
2 votes
1 answer
1424
The children's subtrees each have size at most 2n/3 - the worst case occurs when the last row of the tree is exactly half fullPlz explain this so i get a picture in my he...
3 votes
2 answers
1425
Which of the following is not an inherent application of stack?Implementation of recursionEvaluation of a postfix expressionJob schedulingReverse a string
3 votes
3 answers
1426
Suppose you are given a binary tree with n nodes, such that each node has exactly eiter zero or two children. The maximum height of the tree will be$\frac{n}{2}-1$$\frac{...
7 votes
1 answer
1428
A clique in a simple undirected graph is a complete subgraph that is not contained in any larger complete subgraph. How many cliques are there in a graph shown below?2456...
3 votes
2 answers
1429
The number of different spanning trees in complete graph, $K_4$ and bipartite graph, $K_{2,2}$ have ____ and ___ respectively.14, 1416, 1416, 414, 4
1 votes
2 answers
1430
3 votes
3 answers
1431
3 votes
2 answers
1432
1 votes
1 answer
1434
The inorder traversal of the following tree is$2 \, \, \, 3 \, \, \, 4 \, \, \, 6 \, \, \, 7 \, \, \, 13 \, \, \, 15 \, \, \, 17 \, \, \, 18 \, \, \, 18 \, \, \, 20$$20 \...
3 votes
2 answers
1435
The number of nodes in height h in any n-element heap is$h$$z^h$ceil $\biggl(\frac{n}{z^h} \biggr)$ceil $\biggl(\frac{n}{z^{h+1}} \biggr)$
3 votes
2 answers
1436
2 votes
1 answer
1437