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?
1 vote
2
anyone who can solve this by this methos i think it has some mistakes ?
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?
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
5
E-->TE/a T-->ET/b first set of E and T??
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 ??
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