Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Filter
Bongbirdie
Wall
Recent activity
All questions
All answers
Exams Taken
All Blogs
Recent activity by Bongbirdie
6
answers
1
TIFR CSE 2010 | Part B | Question: 36
In a directed graph, every vertex has exactly seven edges coming in. What can one always say about the number of edges going out of its vertices? Exactly seven edges leave every vertex. Exactly seven edges leave some vertex. Some vertex has at least seven edges leaving it. The number of edges coming out of vertex is odd. None of the above.
In a directed graph, every vertex has exactly seven edges coming in. What can one always say about the number of edges going out of its vertices?Exactly seven edges leave...
5.7k
views
commented
Aug 18, 2017
Graph Theory
tifr2010
graph-theory
degree-of-graph
+
–
6
answers
2
GATE CSE 2014 Set 2 | Question: 51
A cycle on $n$ vertices is isomorphic to its complement. The value of $n$ is _____.
A cycle on $n$ vertices is isomorphic to its complement. The value of $n$ is _____.
17.3k
views
answered
Aug 18, 2017
Graph Theory
gatecse-2014-set2
graph-theory
numerical-answers
normal
graph-isomorphism
non-gate
+
–
4
answers
3
GATE IT 2007 | Question: 3, UGCNET-June2012-III: 34
Consider a weighted, undirected graph with positive edge weights and let $uv$ be an edge in the graph. It is known that the shortest path from the source vertex $s$ to $u$ has weight 53 and the shortest path from $s$ to $v$ has weight 65. Which one of the ... $(u,v) \leq 12$ Weight $(u,v) = 12$ Weight $(u,v) \geq 12$ Weight $(u,v) > 12$
Consider a weighted, undirected graph with positive edge weights and let $uv$ be an edge in the graph. It is known that the shortest path from the source vertex $s$ to $u...
11.3k
views
commented
Jul 15, 2017
Algorithms
gateit-2007
algorithms
graph-algorithms
normal
ugcnetcse-june2012-paper3
+
–
4
answers
4
GATE CSE 2017 Set 1 | Question: 28
The value of $\displaystyle \lim_{x\rightarrow 1} \frac{x^{7}-2x^{5}+1}{x^{3}-3x^{2}+2}$ is $0$ is $-1$ is $1$ does not exist
The value of $\displaystyle \lim_{x\rightarrow 1} \frac{x^{7}-2x^{5}+1}{x^{3}-3x^{2}+2}$is $0$is $-1$is $1$does not exist
6.0k
views
commented
Jul 7, 2017
Calculus
gatecse-2017-set1
calculus
limits
normal
+
–
2
answers
5
Arrays
How to solve this question ?
How to solve this question ?
1.5k
views
commented
Jul 5, 2017
Programming in C
array
data-structures
+
–
12
answers
6
GATE CSE 2015 Set 3 | Question: 24
In a room there are only two types of people, namely $\text{Type 1}$ and $\text{Type 2}$. $\text{Type 1}$ people always tell the truth and $\text{Type 2}$ people always lie. You give a fair coin to a person in that room, without knowing which type ... person is of $\text{Type 2}$, then the result is tail If the person is of $\text{Type 1}$, then the result is tail
In a room there are only two types of people, namely $\text{Type 1}$ and $\text{Type 2}$. $\text{Type 1}$ people always tell the truth and $\text{Type 2}$ people always l...
17.5k
views
commented
Jun 28, 2017
Mathematical Logic
gatecse-2015-set3
mathematical-logic
difficult
logical-reasoning
+
–
11
answers
7
GATE CSE 2017 Set 2 | Question: 13
A circular queue has been implemented using a singly linked list where each node consists of a value and a single pointer pointing to the next node. We maintain exactly two external pointers FRONT and REAR pointing to the front node and the rear node of the queue, respectively ... to the front node. (I) only. (II) only. Both (I) and (II). Neither (I) nor (II).
A circular queue has been implemented using a singly linked list where each node consists of a value and a single pointer pointing to the next node. We maintain exactly t...
27.1k
views
commented
Jun 26, 2017
DS
gatecse-2017-set2
data-structures
queue
+
–
4
answers
8
GATE CSE 2004 | Question: 40
Suppose each set is represented as a linked list with elements in arbitrary order. Which of the operations among $\text{union, intersection, membership, cardinality}$ will be the slowest? $\text{union}$ only $\text{intersection, membership}$ $\text{membership, cardinality}$ $\text{union, intersection}$
Suppose each set is represented as a linked list with elements in arbitrary order. Which of the operations among $\text{union, intersection, membership, cardinality}$ wil...
18.9k
views
commented
Jun 24, 2017
DS
gatecse-2004
data-structures
linked-list
normal
+
–
7
answers
9
GATE CSE 2017 Set 1 | Question: 36
Consider the C functions foo and bar given below: int foo(int val) { int x=0; while(val > 0) { x = x + foo(val--); } return val; } int bar(int val) { int x = 0; while(val > 0) { x ... in: Return of $6$ and $6$ respectively. Infinite loop and abnormal termination respectively. Abnormal termination and infinite loop respectively. Both terminating abnormally.
Consider the C functions foo and bar given below:int foo(int val) { int x=0; while(val 0) { x = x + foo(val ); } return val; }int bar(int val) { int x = 0; while(val 0)...
25.1k
views
commented
Jun 21, 2017
Programming in C
gatecse-2017-set1
programming-in-c
programming
normal
recursion
+
–
1
answer
10
Mathematical Logic
What is the difference between =>, <=> and ->? Are => and -> used in the same way? => is logical implication and <=> is equivalence right? Then why does in some questions, => and <=> is read as 'if then'? '->' symbol is for if then right? Refer to this: https://gateoverflow.in/3454/gate2007-it-21
What is the difference between =>, <= and ->?Are = and - used in the same way? = is logical implication and <= is equivalence right? Then why does in some questions, = an...
336
views
commented
Jun 10, 2017
Mathematical Logic
mathematical-logic
discrete-mathematics
+
–
5
answers
11
GATE IT 2007 | Question: 21
Which one of these first-order logic formulae is valid? $\forall x\left(P\left(x\right) \implies Q\left(x\right)\right) \implies \left(∀xP\left(x\right)\implies \forall xQ\left(x\right)\right)$ ... $\forall x \exists y P\left(x, y\right)\implies \exists y \forall x P\left(x, y\right)$
Which one of these first-order logic formulae is valid?$\forall x\left(P\left(x\right) \implies Q\left(x\right)\right) \implies \left(∀xP\left(x\right)\implies \forall ...
10.3k
views
comment edited
Jun 10, 2017
Mathematical Logic
gateit-2007
mathematical-logic
normal
first-order-logic
+
–
1
answer
12
MadeEasy Subject Test: Algorithms - Graph Algorithms
Which of the following statements is true? Adding a constant to every edge weight in a directed graph can change the set of edges that belongs to minimum cost spanning tree. Assume unique weights. Complete graph with 4 vertices, each edges ... ). None of these how is 3rd wrong? If there is no negative cycles dijkstra can work just fine right?
Which of the following statements is true?Adding a constant to every edge weight in a directed graph can change the set of edges that belongs to minimum cost spanning tre...
3.1k
views
commented
Jun 8, 2017
Algorithms
made-easy-test-series
algorithms
graph-algorithms
dijkstras-algorithm
+
–
1
answer
13
Propositional Logic
#Discrete_Maths #Logic I have a doubt in the following concept. Suppose we're given: (A v B) ^ ( B v C)...when we open the brackets, do we apply distributive law or just open it..as in 1. A v B ^ B v C = A v B ^ C 2. ... see that sometimes, the brackets are opened just like that and in other cases, distributive law is used. How to differentiate what to do when? Please help!
#Discrete_Maths#LogicI have a doubt in the following concept.Suppose we're given:(A v B) ^ ( B v C)...when we open the brackets, do we apply distributive law or just open...
427
views
commented
Jun 6, 2017
Mathematical Logic
propositional-logic
discrete-mathematics
+
–
3
answers
14
Find shortest path
3.1k
views
answered
Jun 6, 2017
Algorithms
algorithms
graph-algorithms
shortest-path
test-series
+
–
4
answers
15
programming Strings
For the following program: #include<stdio.h> char *getString() { char *str = "GfG"; return str; } int main() {getString(); printf("%s", str); // Gives error, but printf("%s", getString()); works perfect. return ... does not get destroyed, wh can't we print the value using str? Why does the program give error saying that str is undeclared?
For the following program:#include<stdio.h>char *getString(){char *str = "GfG";return str; }int main(){getString();printf("%s", str); // Gives error, but printf("%s", get...
1.5k
views
commented
May 29, 2017
Programming in C
programming-in-c
strings
variable-scope
+
–
2
answers
16
Programming Scope of variables
The following program runs perfectly fine without showing compilation error. I am unable to understand why as 'c' is a local variable of 'function_addition'. So, shouldn't it throw an error? #include<stdio.h> int ... ambiguity as to why the first one prints the value of c correctly whereas the second program shows an error.
The following program runs perfectly fine without showing compilation error. I am unable to understand why as 'c' is a local variable of 'function_addition'. So, shouldn'...
940
views
commented
May 29, 2017
Programming in C
programming-in-c
scoping-rule
variable-scope
+
–
11
answers
17
GATE CSE 2017 Set 1 | Question: 35
Consider the following two functions. void fun1(int n) { if(n == 0) return; printf("%d", n); fun2(n - 2); printf("%d", n); } void fun2(int n) { if(n == 0) return; printf("%d", n); ... printf("%d", n); } The output printed when $\text{fun1}(5)$ is called is $53423122233445$ $53423120112233$ $53423122132435$ $53423120213243$
Consider the following two functions.void fun1(int n) { if(n == 0) return; printf("%d", n); fun2(n - 2); printf("%d", n); } void fun2(int n) { if(n == 0) return; printf("...
20.1k
views
commented
May 29, 2017
Programming in C
gatecse-2017-set1
programming
normal
tricky
recursion
+
–
2
answers
18
GATE CSE 2008 | Question: 81
The subset-sum problem is defined as follows. Given a set of $n$ positive integers, $S = \{ a_1, a_2, a_3, \dots , a_n \}$, and positive integer $W$, is there a subset of $S$ whose elements sum to $W$? A dynamic program for solving this problem uses a $\text{2-dimensional}$ ... that there is a subset whose elements sum to $W$? $X[1, W]$ $X[n, 0]$ $X[n, W]$ $X[n-1, n]$
The subset-sum problem is defined as follows. Given a set of $n$ positive integers, $S = \{ a_1, a_2, a_3, \dots , a_n \}$, and positive integer $W$, is there a subset of...
10.1k
views
commented
May 26, 2017
Algorithms
gatecse-2008
algorithms
normal
dynamic-programming
+
–
9
answers
19
GATE CSE 2016 Set 1 | Question: 38
Consider the weighted undirected graph with $4$ vertices, where the weight of edge $\{i,j\}$ is given by the entry $W_{ij}$ in the matrix $W$ ... integer value of $x$, for which at least one shortest path between some pair of vertices will contain the edge with weight $x$ is ___________.
Consider the weighted undirected graph with $4$ vertices, where the weight of edge $\{i,j\}$ is given by the entry $W_{ij}$ in the matrix $W$. W=$\begin{bmatrix} 0&2 &8 &...
23.7k
views
commented
May 23, 2017
DS
gatecse-2016-set1
data-structures
graph-theory
normal
numerical-answers
+
–
1
answer
20
Longest Common Subsequence
For finding longest common subsequence(LCS), standard sources mention that the recursive procedure consisting of the recursive tree occupies O(m+n) space( WITHOUT applying Dynamic Programming). I am unable to understand why is space occupied O(m+n)? Consider the tree of LCS(3 ... value of2^ k = O(m+n) and hence, space should be k=log(m+n). What's wrong with my logic?
For finding longest common subsequence(LCS), standard sources mention that the recursive procedure consisting of the recursive tree occupies O(m+n) space( WITHOUT applyin...
1.3k
views
asked
May 17, 2017
Algorithms
algorithms
longest-common-subsequence
dynamic-programming
+
–
0
answers
21
GATE Graph Theory
Let G = (V, E) be a directed graph where V is the set of vertices and E the set of edges. Then which one of the following graphs has the same strongly connected components as G? ( A ) G1 = (V, E1) where E1 = {(u, v) | (u, v) ∉ E} ( B ) G2 ... D ) G4 = (V4, E) where V4 is the set of vertices in G which are not isolated Can anyone give a detailed answer to this question, please? :)
Let G = (V, E) be a directed graph where V is the set of vertices and E the set of edges. Then which one of the following graphs has the same strongly connected component...
557
views
asked
May 12, 2017
Graph Theory
graph-theory
graph-connectivity
+
–
3
answers
22
GATE CSE 2014 Set 1 | Question: 3
Let $G=(V,E)$ be a directed graph where $V$ is the set of vertices and $E$ the set of edges. Then which one of the following graphs has the same strongly connected components as $G$ ? $G_1$ = $(V,E_1)$ ... $u$ to $v$ in $E\}$ $G_4$ = $(V_4,E)$ where $V_4$ is the set of vertices in $G$ which are not isolated
Let $G=(V,E)$ be a directed graph where $V$ is the set of vertices and $E$ the set of edges. Then which one of the following graphs has the same strongly connected compon...
16.7k
views
commented
May 12, 2017
DS
gatecse-2014-set1
data-structures
graph-theory
ambiguous
+
–
9
answers
23
GATE CSE 2017 Set 1 | Question: 53
Consider the following C program. #include<stdio.h> #include<string.h> void printlength(char *s, char *t) { unsigned int c=0; int len = ((strlen(s) - strlen(t)) > c) ? strlen(s) : strlen(t); printf("%d\n", len); } ... in $string.h$ as returning a value of type $size\_t$, which is an unsigned int. The output of the program is __________ .
Consider the following C program.#include<stdio.h #include<string.h void printlength(char *s, char *t) { unsigned int c=0; int len = ((strlen(s) - strlen(t)) c) ? strlen...
24.7k
views
commented
May 10, 2017
Programming in C
gatecse-2017-set1
programming
programming-in-c
normal
numerical-answers
+
–
1
answer
24
strings in C
I am trying to implement strcpy manually but am getting error. What is the error? Please help! #include<stdio.h> char* cpy(char *a,char *b) { char *arr; arr=&a; while((*a++=*b++)!='\0'); printf("%s", arr); } int main() { char s[15]="Sreeja"; char t[15]="Mukherjee"; cpy(&s,&t); }
I am trying to implement strcpy manually but am getting error. What is the error? Please help! #include<stdio.h char* cpy(char *a,char *b) { char *arr; arr=&a; ...
959
views
answer selected
May 3, 2017
Programming in C
programming-in-c
strings
+
–
2
answers
25
GATE CSE 1993 | Question: 12
The following Pascal program segments finds the largest number in a two-dimensional integer array $A[0\dots n-1, 0\dots n-1]$ using a single loop. Fill up the boxes to complete the program and write against $\fbox{A}, \fbox{B}, \fbox{C} \text{ and } \fbox{D}$ in your answer ... A[i, j]>max then max:=A[i, j]; if |C| then j:=j+1; else begin j:=0; i:=|D| end end end
The following Pascal program segments finds the largest number in a two-dimensional integer array $A[0\dots n-1, 0\dots n-1]$ using a single loop. Fill up the boxes to co...
4.9k
views
commented
May 1, 2017
DS
gate1993
data-structures
array
normal
descriptive
+
–
2
answers
26
malloc
What does the following exactly mean? int *p=(int*)malloc(23); Does it mean that the OS allocates a memory of 23 bytes to int(though it requires just 4 bytes)? I know that to make malloc platform independent, we use sizeof, but what if we use the above syntax ... "%d",sizeof(*p)), I get the answer as 4. Why? Should'nt it return 23 since that's what the memory I allocated?
What does the following exactly mean?int *p=(int*)malloc(23);Does it mean that the OS allocates a memory of 23 bytes to int(though it requires just 4 bytes)? I know that ...
786
views
answer selected
Apr 11, 2017
DS
memory-management
data-structures
programming-in-c
+
–
1
answer
27
Bellman Ford
If there is a negative edge cycle present in a graph, we all know that Bellman Ford has the capability to detect it. My doubt is that, even after the presence of a negative weighted cycle, will Bellman Ford Algorithm give the correct answer or it will simply say NO..shortest path cannot be computed!?
If there is a negative edge cycle present in a graph, we all know that Bellman Ford has the capability to detect it. My doubt is that, even after the presence of a negati...
829
views
answer selected
Apr 8, 2017
Algorithms
shortest-path
bellman-ford
algorithms
+
–
4
answers
28
Bellman Ford Shortest path
Is the below statement correct: Bellman Ford finds all negative weight cycles in the graph. This is true or false?
Is the below statement correct:Bellman Ford finds all negative weight cycles in the graph.This is true or false?
1.8k
views
asked
Apr 6, 2017
Algorithms
algorithms
shortest-path
bellman-ford
true-false
+
–
1
answer
29
Nested Structures
In nested structures, why can't d value be first assigned to the structure members and then make it nested ? I am getting an error but not understanding why. Here is an example: struct ex{ int i; }; struct ex u; u.i=10; struct ex1 { struct ex d; }; struct ex1 t; t.d.i= 20; printf("%d", t.d.i);
In nested structures, why can't d value be first assigned to the structure members and then make it nested ? I am getting an error but not understanding why. Here is an ...
1.5k
views
commented
Apr 6, 2017
Programming in C
programming-in-c
data-structures
nested-structures
+
–
3
answers
30
combinatorics
THERE ARE 10 PRIZES AND 4 STUDENTS. WE WANT ONLY TWO STUDENTS TO GET THE PRIZES. HOW MANY WAYS ARE THERE??
THERE ARE 10 PRIZES AND 4 STUDENTS. WE WANT ONLY TWO STUDENTS TO GET THE PRIZES. HOW MANY WAYS ARE THERE??
724
views
answered
Apr 5, 2017
Mathematical Logic
discrete-mathematics
combinatory
+
–
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register