search
Log In

Answers by Mr_22B

1 vote
1
Consider a Binary Search Tree is created using element 1 to n in following order: 3, 2, 1, 6, 5, 4, 9, 8, 7, 12, 11, 10, ....., n – 3, n – 4, n – 5, n – 2, n – 1, n What is the worst time complexity of searching a number in the Binary Search Tree?
answered Jan 3, 2018 in DS 350 views
1 vote
2
anyone who can solve this by this methos i think it has some mistakes ?
answered Dec 27, 2017 in Databases 403 views
1 vote
3
$S \rightarrow aBA$ $A \rightarrow \epsilon$ $B \rightarrow a$ Here in the given grammar, what will be the look ahead of B's production:- $S \rightarrow a.BA , \$ $ $B \rightarrow .a \text{ , X}$ What will come at the place of X, I think it should be "\$", As $ A \rightarrow \epsilon$, So, B's lookahead should be \$. right?
answered Dec 27, 2017 in Compiler Design 141 views
1 vote
4
What will be complexity to reverse the directed graph?(By reverse i mean reverse direction of all edges).Assume graph is represented by adjacency list. i) No extra space ii)May use extra space
answered Nov 23, 2017 in Programming 159 views
2 votes
5
E-->TE/a T-->ET/b first set of E and T??
answered Nov 23, 2017 in Compiler Design 80 views
1 vote
6
https://www.youtube.com/watch?v=Z4rgivgkNVc&t=1s anyone please tell me if i choose f instead of b at 7:21 then answer will be different there are so many different answers possible here ??
answered Nov 17, 2017 in Digital Logic 52 views
1 vote
7
In an unweighted, undirected connected graph, the shortest path from a node S to every other node is computed most efficiently, in terms of time complexity by (A) Dijkstra's algorithm starting from S (B) Warshall's algorithm (C) performing a DFS starting from S (D) performing a BFS starting from S
answered Nov 13, 2017 in Algorithms 163 views
4 votes
8
Consider n elements that are equally distributed in k stacks. In each stack, elements of it are arranged in ascending order (min is at the top in each of the stack and then increasing downwards). Given a queue of size n in which we have to put all n elements in increasing order. What will be the time complexity of the best known algorithm?
answered Nov 4, 2017 in DS 758 views
1 vote
9
can masters theorem be used when base condition is given in a recurrence ? can we directly apply masters theorem to any recurrence ?
answered Nov 3, 2017 in Algorithms 70 views
1 vote
10
Which of the following is the correct output for the program given below? #include<stdio.h> void fun(int); int main() { int a; a=3; fun(a); printf("\n"); return 0; } void fun(int n) { if(n>0) { fun(--n); printf("%d",n); fun(--n); } } (a) 0 2 1 0 (b) 1 1 2 0 (c) 0 1 0 2 (d) 0 1 2 0
answered Oct 31, 2017 in Programming 66 views
6 votes
11
The average number of probe required when inserting an element with load factor alpha (assume uniform hashing) 1 / 1-alpha how? Please explain
answered Oct 31, 2017 in Algorithms 224 views
...