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
Questions by srestha
0
votes
2
answers
81
Self Doubt on Linked List
Can somebody write the code or algorithm, how merge sort works efficiently in linked list? Is Heap sort most inefficient in Linked List Sorting? Elaborate plz
Can somebody write the code or algorithm, how merge sort works efficiently in linked list? Is Heap sort most inefficient in Linked List Sorting? Elaborate plz
718
views
asked
Apr 29, 2019
DS
linked-list
data-structures
+
–
1
votes
1
answer
82
Made Easy Test Series:Algorithm
Given a sorted array of distinct integer $A\left [ 1,2,....n \right ]$, the tightest upper bound to check the existence of any index $i$, for which $A[i]=i$ ... index and then checking if $A[i]=i$, but answer given as $O(log n).$Please help me out, which will be correct answer?
Given a sorted array of distinct integer $A\left [ 1,2,....n \right ]$, the tightest upper bound to check the existence of any index $i$, for which $A[i]=i$ is equal to _...
743
views
asked
Apr 28, 2019
Algorithms
made-easy-test-series
sorting
time-complexity
+
–
6
votes
5
answers
83
Made Easy Test Series:DBMS-Functional Dependency
Consider a relation $R\left ( A,B,C,D,E \right )$ and functional dependencies are $F=\left \{ AC\rightarrow B,C\rightarrow D,A\rightarrow E,C\rightarrow B \right \}$ Relation $R$ ... Then Is it a lossless decomposition? I am getting doubt, how it can be not lossless decomposition?
Consider a relation $R\left ( A,B,C,D,E \right )$ and functional dependencies are $F=\left \{ AC\rightarrow B,C\rightarrow D,A\rightarrow E,C\rightarrow B \right \}$Relat...
1.4k
views
asked
Apr 28, 2019
Databases
database-normalization
databases
lossless-decomposition
+
–
0
votes
2
answers
84
Self-Doubt:Mathematical logic
“Every asymmetric relation is antisymmetric” Is this statement is True or False? I think it is false, because asymmetric relation never allows loops and antisymmetric relation allows loops. Am I not correct?
“Every asymmetric relation is antisymmetric”Is this statement is True or False?I think it is false, because asymmetric relation never allows loops and antisymmetric r...
477
views
asked
Apr 27, 2019
Set Theory & Algebra
discrete-mathematics
+
–
1
votes
1
answer
85
Made Easy Test Series : Compiler Design
Consider the following CFG: $S\rightarrow Aa\mid ca$ $A\rightarrow c\mid d$ How many conflict occur in $CLR\left ( 1 \right )$ Parsing construction ? I think $LR\left ( 0 \right )$ there is $1$ conflict, but in $SLR\left ( 1 \right )orCLR\left ( 1 \right )$ there won’t be any conflict. Someone verify it.
Consider the following CFG:$S\rightarrow Aa\mid ca$$A\rightarrow c\mid d$How many conflict occur in $CLR\left ( 1 \right )$ Parsing construction ?I think $LR\left ( 0 \ri...
684
views
asked
Apr 27, 2019
Compiler Design
compiler-design
context-free-grammar
lr-parser
made-easy-test-series
descriptive
+
–
0
votes
0
answers
86
Made Easy Test Series: Self Doubt
How bottom-up parser like Operator-Precedence parser parse some ambiguous grammar? According to stanford diagram , ambiguous grammar cannot be parsed and it is separate form of grammar Am I right?
How bottom-up parser like Operator-Precedence parser parse some ambiguous grammar?According to stanford diagram , ambiguous grammar cannot be parsed and it is separate fo...
286
views
asked
Apr 27, 2019
Compiler Design
compiler-design
parsing
descriptive
+
–
0
votes
1
answer
87
Made Easy Test Series:Discrete Math-Mathematical Logic
Consider the following first order logic statement $I)\forall x\forall yP\left ( x,y \right )$ $II)\forall x\exists yP\left ( x,y \right )$ $III)\exists x\exists yP\left ( x,y \right )$ $III)\exists x\forall yP\left ( x,y \right )$ Which one ... true , then $III),IV)$ is true $B)$ If $IV)$ is true , then $II),III)$ is true $C)$ None of these
Consider the following first order logic statement$I)\forall x\forall yP\left ( x,y \right )$$II)\forall x\exists yP\left ( x,y \right )$$III)\exists x\exists yP\left ( x...
502
views
asked
Apr 27, 2019
Mathematical Logic
mathematical-logic
discrete-mathematics
made-easy-test-series
+
–
1
votes
2
answers
88
Made Easy Test Series:DS-Stack and Queue
Consider a single array $A\left [ 0...........(n-1) \right ]$ is used to implement two stacks. Two stacks grows from opposite end of the array. Variable $top_{1}$ and $top_{2}$ points to the location of the topmost elements in each of the stacks ... the number of elements are present in the array at any time? $A)n-top_{2}+top_{1}$ $B)n+1-top_{2}+top_{1}$
Consider a single array $A\left [ 0...........(n-1) \right ]$ is used to implement two stacks. Two stacks grows from opposite end of the array. Variable $top_{1}$ and $t...
2.2k
views
asked
Apr 26, 2019
DS
data-structures
made-easy-test-series
+
–
0
votes
1
answer
89
Allen Career Institute: Discrete Math
Let $f : A \rightarrow B$ be a bijection and let $E,F$ be subjects of $A$, Now, we consider the following statements about the function $f :$ $P : f(E \cup F) = f (E) \cup f(F)$ ... None of $P$ and $Q$ is correct I thought $Q$ is true, but answer is both true. Is both true because of bijective function or ans given incorrect?
Let $f : A \rightarrow B$ be a bijection and let $E,F$ be subjects of $A$, Now, we consider the following statements about the function $f :$$P : f(E \cup F) = f (E) \cup...
884
views
asked
Apr 25, 2019
Set Theory & Algebra
discrete-mathematics
+
–
0
votes
1
answer
90
Made Easy Test Series:Programming
Consider the following C program #include<stdio.h> int main(){ char *arr={"GATE","CAT","IES","IAS","PSU","IFS"}; call(arr); return 0; } void call(char **ptr){ char **ptr1; ptr1=(ptr+=(sizeof(int)))-2; printf("%s",*ptr1); } Assume size of int pointer 4B.What will be output?
Consider the following C program#include<stdio.h int main(){ char *arr={"GATE","CAT","IES","IAS","PSU","IFS"}; call(arr); return 0; } void call(char ptr){ char ptr1; pt...
1.2k
views
asked
Apr 25, 2019
Programming in C
made-easy-test-series
programming
+
–
2
votes
1
answer
91
Made Easy Test Series:Programming & DS
Suppose a queue $Q$ and two stacks $S_{1}$ and $S_{2}$ as given below. void enqueue(Q,x){ push(S1,x); } void dequeue(Q,x){ if(stack-empty(S2))then if(stack-empty(S1))then{ print("Q is empty"); return; } else while ... $Enqueue(4),Enqueue(3),Enqueue(2),Dequeue, Enqueue(6),Dequeue,Dequeue, Dequeue,Enqueue(5)$ Please tell value of X and Y are u getting
Suppose a queue $Q$ and two stacks $S_{1}$ and $S_{2}$ as given below.void enqueue(Q,x){ push(S1,x); } void dequeue(Q,x){ if(stack-empty(S2))then if(stack-empty(S1))then{...
491
views
asked
Apr 24, 2019
Programming in C
made-easy-test-series
programming
+
–
0
votes
2
answers
92
Made Easy Test Series: Programming
Consider the function give below, which should return the index of first zero in input array of length $n$ if present else return $-1.$ int index of zero(int[ ] array,int n){ for(int i=0; P ;i++); if(i==n){ return -1; } return i; } What should be placed ... at P',So that code will work fine? $A)$array[i]!=0 && i<=n $B)$ array[i]!=0 && i<n
Consider the function give below, which should return the index of first zero in input array of length $n$ if present else return $-1.$int index of zero(int[ ] array,int ...
616
views
asked
Apr 24, 2019
Programming in C
made-easy-test-series
programming-in-c
programming
+
–
2
votes
4
answers
93
Made Easy Test Series:Programming and DS
Which of the following data structure is efficient to implement priority queue such as insertion ,deletion, searching? A)Linked List B)Heap C)Sorted Array D)Unsorted Array How priority queue can work more efficiently in any data structure, other than heap?
Which of the following data structure is efficient to implement priority queue such as insertion ,deletion, searching?A)Linked ListB)HeapC)Sorted ArrayD)Unsorted ArrayHow...
3.7k
views
asked
Apr 24, 2019
DS
made-easy-test-series
programming-in-c
programming
+
–
0
votes
0
answers
94
Made Easy Test Series: TOC
The pushdown automata $M=\left \{ \left ( q_{0},q_{1},q_{2} \right ),\left ( a,b \right ) ,\left ( 0,1 \right ),\partial ,q_{0},0,\left \{ q_{0} \right \}\right \}$ $\partial \left ( q_{0},a,0 \right )=\left ( q_{1},10 \right )$ ... $q_{0}$ As last transition going from $q_{2}$ to $q_{0}$ and not $q_{0}$ to $q_{2}$ Am I right?
The pushdown automata $M=\left \{ \left ( q_{0},q_{1},q_{2} \right ),\left ( a,b \right ) ,\left ( 0,1 \right ),\partial ,q_{0},0,\left \{ q_{0} \right \}\right \}$$\part...
676
views
asked
Apr 23, 2019
Theory of Computation
theory-of-computation
made-easy-test-series
+
–
1
votes
1
answer
95
Made Easy Test Series:TOC-DFA
How many number of $DFA$ states(minimal DFA) required which accepts the language $L=\left \{ a^{n}:n=\text{3 or n>= 2m for all m>= 1} \right \}$ ___________ Answer will be $3$ or $6?$
How many number of $DFA$ states(minimal DFA) required which accepts the language $L=\left \{ a^{n}:n=\text{3 or n>= 2m for all m>= 1} \right \}$ ___________Answer will be...
935
views
asked
Apr 23, 2019
Theory of Computation
theory-of-computation
test-series
made-easy-test-series
+
–
0
votes
0
answers
96
Self-Doubt(P-NP class)
$1)$ If the complement of NP-Complete problem is in NP, then can we also say , for this case complement of NP problem is in NP-Complete ? $2)$ If the complement of NP-Complete problem is in Co-NP, then can we also say, for this case complement of Co-NP problem is in NP-Complete?
$1)$ If the complement of NP-Complete problem is in NP, then can we also say , for this case complement of NP problem is in NP-Complete ?$2)$ If the complement of NP-Comp...
869
views
asked
Apr 22, 2019
Theory of Computation
p-np-npc-nph
theory-of-computation
+
–
0
votes
1
answer
97
Made Easy Test Series:DS
I want longest path from root to leaf. Then which code is correct among Code-1 or Code-2? Code-1) int tree(Struct node *root){ int a=0, b=0,c=0; if(root==NULL) return 0; if((root->left==NULL)&&(root->right==NULL)) return 1; a=1+tree(root- ... )&&(root->right==NULL)) return 1; a=tree(root->left); b=tree(root->right); c=1+max(a,b); return c; }
I want longest path from root to leaf. Then which code is correct among Code-1 or Code-2? Code-1)int tree(Struct node *root){ int a=0, b=0,c=0; if(root==NULL) return 0; i...
510
views
asked
Apr 21, 2019
DS
made-easy-test-series
data-structures
+
–
0
votes
0
answers
98
Made Easy Test Series: Computer Network-ICMP
Consider a very large network $10000$ routers. Two host $A$ and $B$ connected with this network. Host $A$ sends a data to host $B$. and after some unit of time host $A$ receives $ICMP$ time exceed message for the samedata ... some ICMP message generated? Say if $ICMP$ message generated in $9999th$ router, then where it give error of time exceed message?
Consider a very large network $10000$ routers. Two host $A$ and $B$ connected with this network. Host $A$ sends a data to host $B$. and after some unit of time host $A$ r...
1.5k
views
asked
Apr 20, 2019
Computer Networks
made-easy-test-series
computer-networks
+
–
0
votes
1
answer
99
Made Easy Test Series : Algorithm
for(k=1;k<(n+1);k++) { for(m=1;m<(n+1);m+=k){ x=x+1; } } What is the T.C. of the following code? Is it $n^{2}$ or $n\log n$??
for(k=1;k<(n+1);k++) { for(m=1;m<(n+1);m+=k){ x=x+1; } }What is the T.C. of the following code?Is it $n^{2}$ or $n\log n$??
593
views
asked
Apr 20, 2019
Algorithms
made-easy-test-series
time-complexity
+
–
0
votes
1
answer
100
Self doubt:Pumping Lemma
How by Pumping Lemma we can prove that “context free grammar generate an infinite number of strings” and here what could be pumping length ?
How by Pumping Lemma we can prove that“context free grammar generate an infinite number of strings”and here what could be pumping length ?
651
views
asked
Apr 19, 2019
Theory of Computation
theory-of-computation
pumping-lemma
+
–
Page:
« prev
1
2
3
4
5
6
7
8
9
10
...
35
next »
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register