5.4k
views
4 answers
The procedure given below is required to find and replace certain characters inside an input character string supplied in array $A$. The characters to be replaced are sup...
22.4k
views
4 answers
In a balanced binary search tree with $n$ elements, what is the worst case time complexity of reporting all elements in range $[a,b]$? Assume that the number of reported ...
32.1k
views
8 answers
Suppose we have a balanced binary search tree $T$ holding $n$ numbers. We are given two numbers $L$ and $H$ and wish to sum up all the numbers in $T$ that lie between $L$...
25.3k
views
9 answers
Suppose a stack implementation supports an instruction $\text{REVERSE}$, which reverses the order of elements on the stack, in addition to the $\text{PUSH}$ and $\text{PO...
11.7k
views
8 answers
A partial order $P$ is defined on the set of natural numbers as follows. Here $\frac{x}{y}$ denotes integer division.$(0, 0) \in P.$$(a, b) \in P$ if and only if $(a \% 1...
24.2k
views
4 answers
Consider the NPDA $$ \left \langle Q= \left \{ q_{0}, q_{1}, q_{2} \right \},\Sigma = \left \{ 0, 1 \right \}, \Gamma = \left \{ 0, 1, \perp \right \}, \delta, q_{0}, \p...
17.0k
views
5 answers
For relation R = (L, M, N, O, P), the following dependencies hold:$ M \rightarrow O,$ $NO \rightarrow P,$ $P \rightarrow L$ and $L \rightarrow MN$R is decomposed into R1 ...
29.2k
views
5 answers
Consider the following relational schemes for a library database:Book (Title, Author, Catalog_no, Publisher, Year, Price) Collection(Title, Author, Catalog_no)with the fo...
21.7k
views
9 answers
A CPU has a five-stage pipeline and runs at $1$ GHz frequency. Instruction fetch happens in the first stage of the pipeline. A conditional branch instruction computes the...
23.1k
views
6 answers
Consider a $128 \times 10^3$ bits/second satellite communication link with one way propagation delay of $150$ milliseconds. Selective retransmission (repeat) protocol is ...
36.7k
views
9 answers
For a C program accessing $\mathbf{X[i] [j] [k]}$, the following intermediate code is generated by a compiler. Assume that the size of an integer is $32$ bits and the siz...
16.8k
views
5 answers
Let $G$ be a weighted graph with edge weights greater than one and $G'$ be the graph constructed by squaring the weights of edges in $G$. Let $T$ and $T'$ be the minimum ...
26.6k
views
6 answers
$G=(V, E)$ is an undirected simple graph in which each edge has a distinct weight, and $e$ is a particular edge of $G$. Which of the following statements about the minimu...