27.1k
views
4 votes
What is the worst case time complexity of inserting $n$ elements into an empty linked list, if the linked list needs to be maintained in sorted order?$\Theta(n)$$\Theta(n...
1.7k
views
0 votes
An infinite two-dimensional pattern is indicated below.The smallest closed figure made by the lines is called a unit triangle. Within every unit triangle, there is a mous...
4.1k
views
2 votes
Five teams have to compete in a league, with every team playing every other team exactly once, before going to the next round. How many matches will have to be held to co...
6.6k
views
7 votes
Let $S$ be a set of $n$ elements $\left\{1, 2,\ldots, n\right\}$ and $G$ a graph with $2^{n}$ vertices, each vertex corresponding to a distinct subset of $S$. Two vertice...
23.9k
views
0 votes
The head of a hard disk serves requests following the shortest seek time first (SSTF) policy. What is the maximum cardinality of the request set, so that the head changes...
1.4k
views
0 votes
Consider the CFG $G$ defi ned by productions$:$$S\rightarrow aSbS|bSaS|\in$Prove that $L(G)$ is the set of all strings with an equal number of $a's$ and $b's.$
1.9k
views
0 votes
Consider the CFG $G$ defi ned by productions$:$$S\rightarrow aS|Sb|a|b$Prove by induction on the string length that no string in $L(G)$ has $ba$ as a substring.Describe $...