search
Log In

Questions by targate2018

1 vote
1 answer
1
The maximum number of edges in a n-node undirected graph WITH self-loops is?
asked Apr 7, 2018 in Algorithms 290 views
0 votes
1 answer
2
#include <stdio.h> int main() { int a = 1, b = 1, d = 1; printf("%d, %d, %d", ++a + ++a+a++, a++ + ++b, ++d + d++ + a++); }
asked Mar 17, 2018 in Programming 54 views
2 votes
2 answers
3
extern int i; int i = 10; i = 5; int main() { printf("%d", i); return 0; } The output for the above code is _______
asked Jan 16, 2018 in Algorithms 304 views
0 votes
0 answers
4
Given an array of n numbers, a median x exists such that x is larger than at least n/20 of the numbers and smaller than at lest n/20 numbers. If this x is used as a pivot in quick sort. What is the worst case running time of this algorithm? a. O(n) b. O(n11/10) 3. O(nlogn) 4.O(n2) 5. O(n10/11 log n)
asked Dec 5, 2017 in Algorithms 94 views
0 votes
1 answer
5
Which of the following strings will match the linux regex a?b*? 1. (empty string) 2. b,bb,bbb.... and ab,abb,abbb...... 3. both a and b 4. acbd, acbde and acbdef
asked Dec 5, 2017 in Algorithms 63 views
0 votes
3 answers
6
m=1; for i=1 to n do begin m=m*3; for j=1 to m do {Something which is O(1)} What is the complexity of above algorithm? 1. O(n*m3) 2. O(n3) 3. O(3n) 4. O(3m)
asked Dec 5, 2017 in Algorithms 116 views
0 votes
1 answer
7
Are MST and shortest path tree identical? T/F? with reasoning.
asked Dec 5, 2017 in Algorithms 83 views
0 votes
0 answers
8
Which of the following graph corresponds to given adjacency matrix $\begin{bmatrix} 0 1 0 0 0 1\\ 1 0 1 0 0 0 \\ 0 1 0 1 0 1 \\ 0 0 1 0 1 0\\ 0 0 0 1 0 1 \\ 1 0 1 0 1 0 \end{bmatrix}$
asked Nov 18, 2017 in Algorithms 93 views
1 vote
0 answers
9
Given a problem X we want to determine whether X is NP-hard. Therefore, a. We construct a reduction from instances of problem X to instances of SAT that runs in polynomial time. b. We construct a reduction from instances of problem X to instances of SAT that runs in ... are mapped to YES instances of problem X, and NO instances of pi are mapped to NO instances of X. e. None of the above
asked Nov 10, 2017 in Theory of Computation 109 views
1 vote
1 answer
10
The solution for the recurrence: T(1)=1 T(n) = T(n-1) + T(n-2) + 1 a. log(n) <= T(n)=n b. n<=T(n)<=n2 c. n2 <= T(n)<= 2n d. 2n <= T(n) <=n!
asked Nov 9, 2017 in Algorithms 187 views
0 votes
1 answer
11
Explain the behaviour of following code: int main() { int *j=0; { int i=10; j=&i; } printf("%d",*j); } a. output is 10. j pointed to address of i, so it was not freed. b. output may be 10 or garbage in given execution c. output is 10. i becomes invisible outside of its block scope, but lives as long as function scope d. output is 0.
asked Nov 9, 2017 in Algorithms 68 views
0 votes
2 answers
12
If the equations (λ+1)x + 8y = 4λ and λx + (λ+3)y = 3λ-1 have no solution, then the number of values of λ is : (A) one (B) two (C) three (D) more than three
asked Nov 5, 2017 in Linear Algebra 283 views
2 votes
2 answers
13
Consider a network system consisting of three networks connected with two routers. Network-A has MTU of 1500 bytes, Network-B has MTU of 620 bytes, Network-C has MTU of 1500 bytes (MTU includes header size). Station-1 needs to send a segment of1380 bytes. The Total size of the packets received at Network-C is _________ bytes if the header size is 20 B.
asked Nov 5, 2017 in Computer Networks 637 views
0 votes
0 answers
14
Consider the effect of using slow start on a line with 10 msec round trip time. The receiver window and the size of congestion window are set to 38 KB and 36 KB respectively. Sender side threshold is set to 18 KB. After 8 transmission a time-out occurs, after time out ... taken to send first full window of 18 KB is____________ (in msec). Assume window size at the start of slow start phase is 2 KB.
asked Nov 5, 2017 in Computer Networks 203 views
12 votes
13 answers
15
9 votes
5 answers
16
The minimum number of tables to represent ER-Diagram such that the relational database satisfies 1NF.
asked Aug 11, 2017 in Databases 3.7k views
1 vote
3 answers
17
A noiseless 4-kHz channel is sampled every 1 msec. What is the maximum data rate? How does the maximum data rate change if the channel is noisy, with a signal-to-noise ratio of 30 dB?
asked Jul 20, 2017 in Computer Networks 486 views
1 vote
1 answer
18
How many Spanning Trees are possible from the graph given below? (a) 24 (b) 34 (c) 44 (d) 54
asked May 3, 2017 in Algorithms 1.3k views
...