Recent questions tagged data-structures

9 votes
1 answer
1381
An item that is read as input can either be pushed to the stack and later popped and printed or printed directly. Number of print permutations that can be obtained using ...
2 votes
3 answers
1382
1 votes
1 answer
1383
Deletion at ending1. Linked list =O(n)2. Array = O(1)3. Dynamic array =O(1)Correct?But given is O(n) for dynamic array
2 votes
1 answer
1384
1 votes
1 answer
1385
what is the time complexity of creating an avl tree??????
1 votes
1 answer
1389
Consider a hash table of size $m = 10000$, and the hash function $h(K) = floor (m(KA \bmod 1))$ for $A = ( \sqrt{5} – 1)/2$. The key $123456$ is mapped to location ____...
2 votes
2 answers
1390
Convert the infix to postfix and prefix expression1) log3! ^log4 *log log 6/7*4!2)log3!^sin 2*cos 3
1 votes
1 answer
1391
using Method : Fold shift , we can find keythen what use of Fold shift in Hashing
3 votes
2 answers
1392
0 votes
2 answers
1393
0 votes
1 answer
1395
The runtime for traversing all the nodes of a binary search tree with $n$ nodes and printing them in an order is$O(\lg n)$$O(n \lg n)$ $O(n)$$O(n^{2})$
0 votes
1 answer
1398
1 votes
0 answers
1399
The no of different balanced parenthesizes possible with n pairs of parenthesis?A. B. C. (2n)!D. n!please explain the answer.
1 votes
2 answers
1400
1 votes
2 answers
1401
In a $B$ tree of order $5$, the following keys are inserted as follows : $7, 8, 1, 4, 13, 20, 2, 6$ and $5$ How many elements are present in the root of the tree ?$1$ $2$...
0 votes
3 answers
1402
A chained hash table has an array size of $100$. What is the maximum number of entries that can be placed in the table ?$100$$200$$10000$There is no upper limit
2 votes
1 answer
1403
In a complete binary tree of n nodes, how far are the two most distant nodes ? Assume each edge in the path counts as !About $\log_{2} n$About $2 \log_{2} n$About $n \log...
0 votes
2 answers
1404
1 votes
2 answers
1406
The number of ways in which the numbers 1, 2, 3, 4, 5 can be inserted intoa Binary Heap such that resulted binary heap is Max Heap.Please give the ans and what is the fo...
0 votes
4 answers
1407
0 votes
1 answer
1408
What is the difference between the binary-search-tree property and the min-heap property? Can the min-heap property be used to print out the keys of an n-node tree in sor...
8 votes
3 answers
1409
In a min-heap with n elements1). The 7th smallest element can be found in time, if duplicates are allowed ?2). The 7th distinct smallest element can be found in time, I...
0 votes
2 answers
1410
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.