Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Filter
Profile
Wall
Recent activity
All questions
All answers
Exams Taken
All Blogs
Questions by srestha
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{...
522
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 ...
652
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.8k
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...
701
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...
990
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...
917
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...
530
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.6k
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$??
635
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 ?
670
views
asked
Apr 19, 2019
Theory of Computation
theory-of-computation
pumping-lemma
+
–
0
votes
1
answer
101
Made Easy Test Series : Aptitude
Seetal wants to sell her bicycle, either a profit of $K$% or a loss of $K$%. What is value of $K?$ Statement $1:$ Difference between the amount Seetal gets in the $2$ cases is $Rs 2560$ Statement $2:$ If Seetal profit is $Rs. K$ her profit percentage is $7.5$%
Seetal wants to sell her bicycle, either a profit of $K$% or a loss of $K$%. What is value of $K?$Statement $1:$ Difference between the amount Seetal gets in the $2$ case...
449
views
asked
Apr 18, 2019
Quantitative Aptitude
made-easy-test-series
general-aptitude
quantitative-aptitude
+
–
0
votes
0
answers
102
Branch Address
To get branch address, do we need base register value or Program Counter value?
To get branch address, do we need base register value or Program Counter value?
540
views
asked
Apr 17, 2019
CO and Architecture
co-and-architecture
+
–
0
votes
0
answers
103
Self doubt- Turing machine
$1)L=M$ is a turing machine $M$ accepts two strings of different length $2)L=M$ is a turing machine $M$ accepts atleast two strings of different length Which one RE? Which one REC? How to compute the different length string?
$1)L=M$ is a turing machine $M$ accepts two strings of different length $2)L=M$ is a turing machine $M$ accepts atleast two strings of different length Which one RE? Whic...
294
views
asked
Apr 13, 2019
Theory of Computation
turing-machine
theory-of-computation
+
–
0
votes
0
answers
104
Made Easy Test Series :TOC1
$(a,b,c)$ represents by reading input $a$, it replaces $a$ by $b$ and moved to $c$ direction. Which of the following language accepted by TM? My question is what $y$ is accepting in TM? I mean why $y$ is needed? What language is accepted ?
$(a,b,c)$ represents by reading input $a$, it replaces $a$ by $b$ and moved to $c$ direction. Which of the following language accepted by TM?My question is what $y$ is ac...
246
views
asked
Apr 12, 2019
Theory of Computation
made-easy-test-series
automata
+
–
0
votes
1
answer
105
Allen Career Institute:TOC1
The value of a regular expression r over ∑, denoted by Val(r), is defined as follows : 1. Val (Ø) = 0 2. Val (ε) = 0 3. Val (a) = 0 for every a ε ∑ 4. Val ((r. s)) = Val ((r + s)) = max(Val (r), Val (s)) 5. Val ((r*)) = Val (r) + 1 Find the value of regular expression (a (a + a*a a)) (1) 3 (2) 2 (3) 1 (4) 0 How max function working here?
The value of a regular expression r over ∑, denoted by Val(r), is defined as follows :1. Val (Ø) = 02. Val (ε) = 03. Val (a) = 0 for every a ε ∑4. Val ((r. s)) = V...
277
views
asked
Apr 11, 2019
Theory of Computation
finite-automata
+
–
1
votes
1
answer
106
Allen Career Institute:Regular Expression
The regular expression 0*(10*)* denote the same set as (1) (1*0)*1* (2) 0+(0+10)* (3) (0+1)*10(0+1)* (4) None of these Isnot 1) as same as given expression?
The regular expression 0*(10*)* denote the same set as(1) (1*0)*1*(2) 0+(0+10)*(3) (0+1)*10(0+1)*(4) None of theseIsnot 1) as same as given expression?
578
views
asked
Apr 11, 2019
Theory of Computation
finite-automata
+
–
0
votes
0
answers
107
Allen Carrer Institute: TOC1
How many no. of states in DFA for the following required expression? $(a + b + c) (a + b + c) (a + b + c) (a + b + c) ……… (n – 2)$ times $(a + b + c)^{+}$ $(1) $ $n – 1$ $(2) $ $n$ $(3) $ $n + 1$ $(4) $ $n + 2$ Plz confirm me the answer . Is it $(n-1)$ or $n ?$
How many no. of states in DFA for the following required expression?$(a + b + c) (a + b + c) (a + b + c) (a + b + c) ……… (n – 2)$ times $(a + b + c)^{+}$$(1) $$n ...
452
views
asked
Apr 11, 2019
Theory of Computation
finite-automata
+
–
0
votes
0
answers
108
Allen Carrer Institute: Algorithm
Using best first search for a shortest path from A to Z, the order in which nodes are considered best for the path is (Note :- that these are node orders not full paths.) (1) A < C < F < D < E (2) A < C < E < B (3) A < C < F < E < B (4) A < C < D < F
Using best first search for a shortest path from A to Z, the order in which nodes are considered best for the path is (Note :- that these are node orders not full paths.)...
457
views
asked
Apr 5, 2019
Algorithms
algorithms
+
–
0
votes
0
answers
109
Allen Career Institute: Algorithm
Identify the algorithm which works on the principle that locally optimal solutions are globally optimal. $\left ( A \right )$ Divide and Conquer $\left ( B \right )$ Greedy $\left ( C \right )$ Dynamic Programming $\left ( D \right )$ All of the above
Identify the algorithm which works on the principle that locally optimal solutions are globally optimal.$\left ( A \right )$ Divide and Conquer$\left ( B \right )$ Greedy...
1.3k
views
asked
Apr 5, 2019
Algorithms
algorithms
+
–
1
votes
0
answers
110
Made Easy Test Series : Doubt on Automata
$\left \{ a^{n}.b^{n+k}\mid n\geq 0,k\geq 1 \right \}\cup \left \{ a^{n+k}.b^{n}\mid n\geq 0,k\geq 3 \right \}$ is DCFL Is it true? As we know union of two DCFL cannot be DCFL
$\left \{ a^{n}.b^{n+k}\mid n\geq 0,k\geq 1 \right \}\cup \left \{ a^{n+k}.b^{n}\mid n\geq 0,k\geq 3 \right \}$ is DCFLIs it true? As we know union of two DCFL cannot be ...
678
views
asked
Apr 4, 2019
Theory of Computation
made-easy-test-series
theory-of-computation
dcfl
+
–
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