Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Filter
srestha
Wall
Recent activity
All questions
All answers
Exams Taken
All Blogs
Answers by srestha
0
votes
201
Cut Sets in graph
Question: Number of cut sets possible a tree with 10 vertices _________ My approach : Number of edges in a tree with 10 vertices = 9. Each of these can be considered as a cut set as deleting one edge necessarily disconnects the graph. Also any combination (I mean ... cut sets = 2^9 - 1 = 511. But the answer is written 9. Apparently they are not considering the super sets. Why?
Question: Number of cut sets possible a tree with 10 vertices _________My approach : Number of edges in a tree with 10 vertices = 9. Each of these can be considered as a...
3.4k
views
answered
Nov 9, 2017
Graph Theory
engineering-mathematics
graph-theory
discrete-mathematics
cut
set-theory&algebra
+
–
3
votes
202
MadeEasy Subject Test: Algorithms - Time Complexity
Consider an array contain n distinct elements. In array till ‘i’ location element are in increasing order and after ‘i’ location all elements are in decreasing order. What is the time complexity to find location of ith element?
Consider an array contain n distinct elements. In array till ‘i’ location element are in increasing order and after ‘i’ location all elements are in decreasing or...
1.1k
views
answered
Nov 8, 2017
Algorithms
made-easy-test-series
algorithms
time-complexity
+
–
1
votes
203
Inequality
If 0$<$x$<$1 then (a) $\sqrt{\frac{1-x}{1+x}} < \frac{log(1+x)}{sin^{-1}x} < 1$ (b) $\sqrt{\frac{1-x}{1+x}} > \frac{log(1+x)}{sin^{-1}x} > 1$ (c) $\sqrt{\frac{1-x}{1+x}} > \frac{log(1+x)}{sin^{-1}x} < 1$ (d) $\sqrt{\frac{1-x}{1+x}} < \frac{log(1+x)}{sin^{-1}x} > 1$
If 0$<$x$<$1 then(a) $\sqrt{\frac{1-x}{1+x}} < \frac{log(1+x)}{sin^{-1}x} < 1$(b) $\sqrt{\frac{1-x}{1+x}} \frac{log(1+x)}{sin^{-1}x} 1$(c) $\sqrt{\frac{1-x}{1+x}} \fra...
560
views
answered
Nov 8, 2017
Calculus
maths
+
–
2
votes
204
what is the language accepted by this machine?
in this b,c,d all are true .how can we find the appropriate one ?
in this b,c,d all are true .how can we find the appropriate one ?
1.2k
views
answered
Nov 8, 2017
Theory of Computation
theory-of-computation
+
–
0
votes
205
#virtual memory
195
views
answered
Nov 8, 2017
0
votes
206
Max Heap
The number of ways in which the numbers 1, 2, 3, 4, 5 can be inserted into binary heap. Such that resulted binary heap is max heap ________.
The number of ways in which the numbers 1, 2, 3, 4, 5 can be inserted into binary heap. Such that resulted binary heap is max heap ________.
3.0k
views
answered
Nov 7, 2017
DS
binary-heap
data-structures
+
–
1
votes
207
Testbook Test Series: Algorithms - Graph Algorithms
(1). Both BFS and DFS require $\Omega (N)$ storage for their operation. (2). If we double the weight of every edge in the Graph shortest path between any two vertices will not change. Which of the following is/are True ? (and in every question of shortest path we have to think about negative weight ?)
(1). Both BFS and DFS require $\Omega (N)$ storage for their operation.(2). If we double the weight of every edge in the Graph shortest path between any two vertices will...
1.4k
views
answered
Nov 7, 2017
Algorithms
algorithms
testbook-test-series
graph-algorithm
+
–
1
votes
208
group
Let S={1,2,3} and P(s) is power set of S.A binary operation * is defined by A*B = (A-B) U (B-A). if (P(S),*) is a group then complement of {1} is a){1} b){2} c){3} d){2,3}
Let S={1,2,3} and P(s) is power set of S.A binary operation * is defined by A*B = (A-B) U (B-A). if (P(S),*) is a group then complement of {1} isa){1}b){2}c){3}d){2,3}...
369
views
answered
Nov 6, 2017
2
votes
209
Heap Question
Suppose we are sorting(increasing/ decreasing) an array of 10 unsorted elements. We have just finished some heapify(max heapify/ min heapify) operations. The array now looks like: 9, 8, 10, 7, 5, 6, 4, 3, 2, 1. How many heapify operations have been performed on the root so far ?
Suppose we are sorting(increasing/ decreasing) an array of 10 unsorted elements. We have just finished some heapify(max heapify/ min heapify) operations. The array now lo...
647
views
answered
Nov 6, 2017
1
votes
210
TIME COMPLEXITY
974
views
answered
Nov 6, 2017
Algorithms
algorithms
time-complexity
made-easy-test-series
+
–
0
votes
211
permutations and sets
323
views
answered
Nov 6, 2017
Combinatory
combinatory
discrete-mathematics
set-theory&algebra
+
–
3
votes
212
Binary search on two mutually exclusive arrays.
There are two sorted list each of length $n$ ... the search the moment we find the element. So tell me whose solution is correct? Why my solution should be incorrect?
There are two sorted list each of length $n$. An element to be searched in the both the lists. The lists are mutually exclusive. The maximum number of comparisons require...
1.2k
views
answered
Nov 5, 2017
Algorithms
binary-search
algorithms
data-structures
time-complexity
+
–
0
votes
213
UGC NET CSE | November 2017 | Part 2 | Question: 12
The associativity of which of the following operators is Left to Right, in C++? Unary Operator Logical not Array element access addressof
The associativity of which of the following operators is Left to Right, in C++?Unary OperatorLogical notArray element accessaddressof
980
views
answered
Nov 5, 2017
Unknown Category
ugcnetcse-nov2017-paper2
+
–
2
votes
214
Engineering Mathematics - Linear Algebra
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
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
620
views
answered
Nov 5, 2017
Linear Algebra
engineering-mathematics
linear-algebra
+
–
3
votes
215
#dining-philoshpers problem
3.1k
views
answered
Nov 4, 2017
2
votes
216
mock test
Consider n elements that are equally distributed in k stacks. In each stack, elements of it are arranged in ascending order (min is at the top in each of the stack and then increasing downwards). Given a queue of size n in which we have to put all n elements in increasing order. What will be the time complexity of the best known algorithm?
Consider n elements that are equally distributed in k stacks. In each stack, elements of it are arranged in ascending order (min is at the top in each of the stack and th...
2.8k
views
answered
Nov 4, 2017
DS
stack
algorithms
data-structures
+
–
0
votes
217
MadeEasy Test Series: Programming & DS - Binary Tree
The number of ways we can insert elements { 1, 2, 3, .... 7 } to make an AVL tree, so that it does not have any rotation are _______ ?
The number of ways we can insert elements { 1, 2, 3, .... 7 } to make an AVL tree, so that it does not have any rotation are _______ ?
4.0k
views
answered
Nov 3, 2017
DS
made-easy-test-series
data-structures
binary-tree
avl-tree
+
–
4
votes
218
Loop detection in a Linked list
Consider the following code which is used to detect the loop in the linked list. Find the missing statement A? p = head; q = head->next; while(A) { if(p == q) exit(0) //loop detected p = p->next; q = (q->next)?(q->next->next) : q-> ... (p!=NULL) || (q!=NULL) Given ans is c.......but I think b could also be correct if not than why..... Please explain
Consider the following code which is used to detect the loop in the linked list. Find the missing statement A?p = head; q = head->next; while(A) { if(p == q) exit(0) //lo...
1.3k
views
answered
Nov 3, 2017
Programming in C
linked-list
data-structures
+
–
2
votes
219
C CODING
#include <stdio.h> #include <stdlib.h> int* fun(); int main() { int *a = fun(); printf("%d",*a); return 0; } int* fun() { int *a =(int*) malloc(sizeof(int)); *a = 10; return a; } When it will give memory leak problem .. what should be changes ? pls explain in detail
#include <stdio.h #include <stdlib.h int* fun(); int main() { int *a = fun(); printf("%d",*a); return 0; } int* fun() { int *a =(int*) malloc(sizeof(int)); *a = 10; retur...
508
views
answered
Nov 2, 2017
Programming in C
programming-in-c
+
–
2
votes
220
algorithm
Suppose A is sorted array and some of the elements are duplicates what is the best upper bound to find out the number of elements that are equal to any given key 'k'.
Suppose A is sorted array and some of the elements are duplicates what is the best upper bound to find out the number of elements that are equal to any given key 'k'.
822
views
answered
Nov 2, 2017
Algorithms
algorithms
sorting
+
–
0
votes
221
MadeEasy Subject Test: Algorithms - Graph Algorithms
Consider vertices V1 and V2 that are simultaneously on function call stack at some point during DFS from vertex s. Which of the following are always true for this digraph ? 1. There exists a directed path from s to V1 and s to ... only statement 3 is correct......How can we say that statement 1 is also correct please someone explain the reason
Consider vertices V1 and V2 that are simultaneously on function call stack at some point during DFS from vertex s.Which of the following are always true for this digraph ...
790
views
answered
Oct 31, 2017
Algorithms
made-easy-test-series
algorithms
graph-algorithms
+
–
2
votes
222
Depth First Search
Please someone explain .... A directed graph G is acyclic iff depth first search of G yields no back edges
Please someone explain ....A directed graph G is acyclic iff depth first search of G yields no back edges
575
views
answered
Oct 31, 2017
Programming in C
depth-first-search
+
–
7
votes
223
QUEUE USING STACKS
Q.What will be time complexity of enqueue and dequeue operation when a queue is implemented using two stacks.
Q.What will be time complexity of enqueue and dequeue operation when a queue is implemented using two stacks.
3.9k
views
answered
Oct 31, 2017
DS
data-structures
queue
stack
+
–
0
votes
224
Min Heap
In a min-heap, the next largest element of a particular element can be found in ___ time. A) O(1) B) O(log n) C) O(n)
In a min-heap, the next largest element of a particular element can be found in ___ time.A) O(1)B) O(log n)C) O(n)
4.9k
views
answered
Oct 31, 2017
DS
data-structures
binary-heap
time-complexity
+
–
0
votes
225
True/False
Let A(x) and B(x) be any two first order formulas that contains the free variable x(plus other non free variables). The sentence A(x) is decidable is an abbreviation for "is there an algorithm which states whether, given a value of x, A(x) is true or false." ... is not decidable. 8) If A(x) is not decidable and B(x) is not decidable, then ∀x (A(x) ∧∀yB(y)) is not decidable.
Let A(x) and B(x) be any two first order formulas that contains the free variable x(plus other non free variables). The sentence “A(x) is decidable” is an abbreviatio...
604
views
answered
Oct 27, 2017
Theory of Computation
theory-of-computation
decidability
+
–
0
votes
226
C. interesting scenario.
Can you see why the output of the following code is 256? main () { int a=0x1ff; char *careful= &a; *careful = 0; printf("%d", a); }
Can you see why the output of the following code is 256?main () { int a=0x1ff; char *careful= &a; *careful = 0; printf("%d", a); }
490
views
answered
Oct 24, 2017
Programming in C
programming
programming-in-c
output
+
–
1
votes
227
Geeksforgeeks
What will be the output of following programs and why ? 1) void foo(float *); int main() { int i = 10, *p = &i; foo((float*)&i); return 0; } void foo(float *p) { printf("%f\n", *p); } 2) int main() { char arr[] = "geeksforgeeks"; char ... ;<= 2, c >>= 2); getchar(); } Output:4 4 4 I am not getting why the 3rd one is 4,because 5>>2 will give 1
What will be the output of following programs and why ?1)void foo(float *);int main(){int i = 10, *p = &i;foo((float*)&i);return 0;}void foo(float *p){printf("%f\n", *p);...
1.2k
views
answered
Oct 24, 2017
Programming in C
programming-in-c
programming-in-c
+
–
0
votes
228
probability
5 cards are drawn successively with replacement from well shuffled deck of 52 cards. What is the probability that i) all the five cards are spades ii) only 3 cards are spades iii) none is a spade.
5 cards are drawn successively with replacement from well shuffled deck of 52 cards.What is the probability thati) all the five cards are spadesii) only 3 cards are spade...
514
views
answered
Oct 18, 2017
7
votes
229
GATE CSE 1990 | Question: 3-iv
The total external path length, $\text{EPL},$ of a binary tree with $n$ external nodes is, $\text{EPL}= \displaystyle \sum_{w} I_w$, where $I_{w}$ is the path length of external node $w$), $\leq n^{2}$ always. $\geq n \log_{2} n$ always. Equal to $n^{2}$ always. $O(n)$ for some special trees.
The total external path length, $\text{EPL},$ of a binary tree with $n$ external nodes is, $\text{EPL}= \displaystyle \sum_{w} I_w$, where $I_{w}$ is the path length of e...
6.1k
views
answered
Oct 18, 2017
DS
gate1990
normal
data-structures
binary-tree
multiple-selects
+
–
3
votes
230
GATE CSE 1990 | Question: 11b
The following program computes values of a mathematical function $f(x)$. Determine the form of $f(x)$. main () { int m, n; float x, y, t; scanf ("%f%d", &x, &n); t = 1; y = 0; m = 1; do { t *= (-x/m); y += t; } while (m++ < n); printf ("The value of y is %f", y); }
The following program computes values of a mathematical function $f(x)$. Determine the form of $f(x)$.main () { int m, n; float x, y, t; scanf ("%f%d", &x, &n); t = 1; y ...
2.0k
views
answered
Oct 18, 2017
Algorithms
gate1990
descriptive
algorithms
identify-function
+
–
Page:
« prev
1
2
3
4
5
6
7
8
9
10
11
12
...
36
next »
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register