Recent activity by vipsharmavip

1 answer
1
A program takes input of a binary tree with N nodes and computes a function f(x)=max height of left subtree-max height of right subtreewhat is the time complexity?
1 answer
3
#define LIMIT 1000void fun2(int n){ if (n <= 0) return; if (n LIMIT) return; printf("%d ", n); fun2(2*n); printf("%d ", n);} Will it be non terinating recur...
1 answer
5
2 answers
6
Out of (2n + 1) tickets consecutively numbered three are drawn at random. Find the probability that the numbers on them are in arithmetic progression?3n/4n2-12n/4n2-12n/4...
1 answer
7
1 answer
8
How to learn and understand graph theory in 23 days i mean before gate exam? Can anybody help in this.Like there are many new terms bipartite graph etc etc i m not able ...
1 answer
9
given a N-bit string.what is the time complexity to find out all subsets of that string which is parlindrome?
1 answer
10
1 answer
12
How many solutions are there to the equation: $X_1+X_2+X_3+X_4+X_5=21$ ?If $0 \leq X1 \leq 3 , 1 \leq X2 < 4 , X3 \geq 15$
2 answers
14
Time complexity to insert a node in the end of circular linked list, if the pointer to the 1st node is given and number of nodes in list is NisA)O(1)B)O(log N)C)O(N)D)O(N...
3 answers
15
a)(d,c)b)(d,b)c)(e,b)d)(e,f)
1 answer
17
Consider the following code
1 answer
18
The answer given is n-k+1C2 but couldn't understand how both are related
1 answer
19
1 answer
22
Running time of following program? function(n) { for( i = 1 ; i <= n ; i + + ) for( j = 1 ; j <= n ; j+ = i ) print("*") ; }
2 answers
24
2 answers
25
The recurrence relation for the number of n-digit quaternary sequences that have an even number of zeros (quaternary sequences use only 0,1,2,3 for digits) is-(A) an = an...
1 answer
27
please explain these few point:how is longest path between any pair of vertices different from diameter of a agraph.?in dijkstra algorithm,each edge is relaxed eaxtly one...
1 answer
28
how can we find longest path between any pair of vertices in a garph??