search
Log In

Recent questions tagged data-structures

0 votes
1 answer
1
A complete $n$-ary tree is a tree in which each node has $n$ children or no children. Let $I$ be the number of internal nodes and $L$ be the number of leaves in a complete $n$-ary tree. If $L=41$, and $I=10$, what is the value of $n$? $3$ $4$ $5$ $6$
asked Nov 20 in DS jothee 29 views
1 vote
1 answer
2
In a binary max heap containing $n$ numbers, the smallest element can be found in ______ $O(n)$ $O(\log _2 n)$ $O(1)$ $O(\log_2 \log_2 n)$
asked Nov 20 in DS jothee 22 views
0 votes
0 answers
3
Which of the following statements are true? Minimax search is breadth-first; it processes all the nodes at a level before moving to a node in next level. The effectiveness of the alpha-beta pruning is highly dependent on the order in which the states are examined The alpha-beta search algorithms computes the same ... and $(c)$ only $(a)$ and $(d)$ only $(b)$ and $(c)$ only $(c)$ and $(d)$ only
asked Nov 20 in DS jothee 12 views
0 votes
1 answer
4
Match $\text{List I}$ with $\text{List II}$ Let $R_1=\{(1,1), (2,2), (3,3)\}$ and $R_2=\{(1,1), (1,2), (1,3), (1,4)\}$ ... answer from the options given below: $A-I, B-II, C-IV, D-III$ $A-I, B-IV, C-III, D-II$ $A-I, B-III, C-II, D-IV$ $A-I, B-IV, C-II, D-III$
asked Nov 20 in DS jothee 20 views
0 votes
2 answers
5
A hash table with $10$ buckets with one slot per bucket is depicted. The symbols, $S1$ to $S7$ are initially emerged using a hashing function with linear probing. Maximum number of comparisons needed in searching an item that is not present is $6$ $5$ $4$ $3$
asked Apr 2 in DS Lakshman Patel RJIT 167 views
0 votes
1 answer
6
0 votes
1 answer
7
We have a binary heap on $n$ elements and wish to insert $n$ more elements (not necessarily one after another) into this heap. Total time required for this is $\Theta (\log n)$ $\Theta (n)$ $\Theta (n \log n)$ $\Theta (n^{2})$
asked Apr 2 in DS Lakshman Patel RJIT 115 views
0 votes
1 answer
8
You are given the postorder traversal, $P$, of a binary search tree on the $n$ elements $1,2,\dots,n.$ You have to determine the unique binary search tree that has $P$ as its postorder traversal. What is the time complexity of the most efficient algorithm for doing this? $\Theta(\log n)$ $\Theta(n)$ $\Theta(n \log n)$ None of the above, as the tree cannot be uniquely determined.
asked Apr 2 in DS Lakshman Patel RJIT 112 views
0 votes
1 answer
9
Consider the process of inserting an element into a $Max\ Heap$, where the $Max\ Heap$ is represented by an $array$. Suppose we perform a binary search on the path from the new leaf to the root to find the position for the newly inserted element, the number of $comparisons$ performed is $\Theta(\log _{2}n)$ $\Theta(n\log _{2} \log_2 n)$ $\Theta (n)$ $\Theta(n\log _{2}n)$
asked Apr 2 in DS Lakshman Patel RJIT 557 views
0 votes
1 answer
10
In a circularly linked list organization, insertion of a record involves the modification of no pointer $1$ pointer $2$ pointers $3$ pointers
asked Apr 2 in DS Lakshman Patel RJIT 137 views
2 votes
1 answer
11
To sort many large objects or structures, it would be most efficient to place them in an array and sort the array pointers to them in an array and sort the array them in a linked list and sort the linked list references to them in an array and sort the array
asked Apr 2 in DS Lakshman Patel RJIT 272 views
2 votes
1 answer
12
The average search time of hashing, with linear probing will be less if the load factor is far less than one equals one is far greater than one none of these
asked Apr 2 in DS Lakshman Patel RJIT 118 views
0 votes
1 answer
13
The height of a binary tree is the maximum number of edges in any root to leaf path. The maximum number number of nodes in a binary tree of height $h$ is $2^{h}$ $2^{h-1} – 1$ $2^{h+1} – 1$ $2^{h+1}$
asked Apr 1 in DS Lakshman Patel RJIT 326 views
0 votes
2 answers
14
0 votes
1 answer
15
If queue is implemented using arrays, what would be the worst run time complexity of queue and dequeue operations? $O(n),O(n)$ $O(n),O(1)$ $O(1),O(n)$ $O(1),O(1)$
asked Apr 1 in DS Lakshman Patel RJIT 184 views
0 votes
0 answers
17
A binary search tree contains the values-$1,2,3,4,5,6,7$ and $8.$ The tree is traversed in preorder and the values are printed out. Which of the following sequences is a valid output? $5\;\;3\;\;1\;\;2\;\;4\;\;7\;\;8\;\;6\;\;$ $5\;\;3\;\;1\;\;2\;\;6\;\;4\;\;9\;\;7$ $5\;\;3\;\;2\;\;4\;\;1\;\;6\;\;7\;\;8$ $5\;\;3\;\;1\;\;2\;\;4\;\;7\;\;6\;\;8$
asked Apr 1 in DS Lakshman Patel RJIT 179 views
0 votes
2 answers
18
0 votes
2 answers
19
1 vote
1 answer
20
The address field of linked list : Contain address of next node May contain null character Contain address of next pointer Both $\left (A \right)$ and $\left ( B \right)$
asked Mar 31 in DS Lakshman Patel RJIT 612 views
1 vote
1 answer
21
The expression $5-2-3^{*} – 2$ will evaluate to $18$, if : $‘ – ‘$ is left associative and $‘*‘$ has precedence over $‘ – ‘$ $‘ – ‘$ is right associative and $‘*‘$ has precedence over $‘ – ‘$ $‘ – ‘$ is right associative and $‘ – ‘$ has precedence over $‘*‘$ $‘ – ‘$ is left associative and $‘ – ‘$ has precedence over $‘*‘$
asked Mar 31 in DS Lakshman Patel RJIT 232 views
0 votes
1 answer
22
2 votes
1 answer
23
1 vote
4 answers
24
A ________ is a linear list in which insertions and deletions are made to from either end of the structure. Circular queue. Priority queue. Stack. Dequeue.
asked Mar 31 in DS Lakshman Patel RJIT 334 views
0 votes
1 answer
25
The recurrence relation capturing the optimal execution time of the Towers of Hanoi problem with $n$ discs is: $T(n)=2T(n-2)+2$ $T(n)=2T(n/2)+1$ $T(n)=2T(n-1)+n$ $T(n)=2T(n-1)+1$
asked Mar 31 in DS Lakshman Patel RJIT 244 views
0 votes
2 answers
26
1 vote
1 answer
27
1 vote
2 answers
28
In the ________ traversal we process all of a vertex's descendants before we move to an adjacent vertex. Depth First Breadth First Width First Depth Limited
asked Mar 31 in DS Lakshman Patel RJIT 386 views
0 votes
2 answers
29
0 votes
2 answers
30
...