Recent questions tagged data-structures

0 votes
5 answers
1591
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...
0 votes
1 answer
1592
0 votes
6 answers
1594
The in-order traversal of a tree resulted in FBGADCE. Then pre-order traversal would result in.a)FGBDECAb)ABFGCDEC)BFGCDEAd)AFGBDEC
9 votes
9 answers
1595
How many different trees are there with four nodes $\text{A, B, C}$ and $\text{D}?$$30$$60$$90$$120$
2 votes
5 answers
1597
The minimum number of fields with each node of doubly linked list is1234
0 votes
3 answers
1598
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 ?
0 votes
1 answer
1601
0 votes
1 answer
1602
4 votes
3 answers
1604
What is the maximum number of parenthesis that will appear on the stack at any one time for parenthesis expression given by$( ( ) \; ( ( ) ) \; ( ( ) ) ...
5 votes
1 answer
1605
0 votes
3 answers
1606
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...
2 votes
2 answers
1608
how to convert into inorder traversal if preorder traversal of binary tree is given in the problem ? exaplain using example.
0 votes
2 answers
1609
suppose expression is like : ((a+b)+((c+d))), so how to find duplicate parenthesis in the given expression ?
0 votes
1 answer
1610
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...
0 votes
1 answer
1611
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...
42 votes
12 answers
1613
Consider a binary tree T that has $200$ leaf nodes. Then the number of nodes in T that have exactly two children are ______.
32 votes
4 answers
1614
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...
36 votes
4 answers
1615
Given that hash table $T$ with $25$ slots that stores $2000$ elements, the load factor $a$ for $T$ is _________.
25 votes
8 answers
1616
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$
27 votes
6 answers
1617
The result evaluating the postfix expression $10 \ 5 + 60 \ 6 / * 8 -$ is $284$$213$$142$$71$
28 votes
1 answer
1619
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} & \...