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
6
votes
1
answer
61
Made Easy Test Series:Time Complexity
Consider the following program: int Bar(int n){ if(n<2) return; } else{ int sum=0; int i,j; for(i=1;i<=4;i++) Bar(n/2); for(i=1;i<=n;i++){ for(j=1;j<=i;j++){ sum=sum+1; } } } Now consider the following ... $Bar\left ( n \right )$ is $O \left ( n^{3}logn^{2} \right )$ How many statements are correct________________
Consider the following program:int Bar(int n){ if(n<2) return; } else{ int sum=0; int i,j; for(i=1;i<=4;i++) Bar(n/2); for(i=1;i<=n;i++){ for(j=1;j<=i;j++){ sum=sum+1; } ...
2.4k
views
asked
May 7, 2019
Algorithms
made-easy-test-series
algorithms
time-complexity
+
–
0
votes
1
answer
62
Self-Doubt:Program
Can someone tell me, why these two same program giving different output?Is there any problem in code or compiler not producing right? Program1 Program2
Can someone tell me, why these two same program giving different output?Is there any problem in code or compiler not producing right?Program1Program2
459
views
asked
May 6, 2019
Programming in C
programming-in-c
output
+
–
3
votes
3
answers
63
Made Easy Test Series:Data Structure-Stack
There is given a infix expression: ${\color{Red} {1}}$ $A+B\times C/\left ( \left ( D+E \right )+F\times G \right )$ While converting infix expression to postfix expression number of symbols in the stack at indicated ... $5$, but is it correct? Can anyone give some explanation??
There is given a infix expression: ${\color{Red} {1}}$$A+B\times C/\left ( \left ( D+E \right )+F\times G \rig...
1.1k
views
asked
May 6, 2019
DS
made-easy-test-series
data-structures
stack
+
–
0
votes
1
answer
64
Made Easy Test Series: Algo- Mathematical Solution
Through an experiment, it is found that selection sort performs $5000$ comparisons when sorting an array of size $k.$ If the size of array is doubled, what will be the number of comparisons? will it be $\left ( 5000 \right )^{2}$ or $\left ( 5000 \right )\times 4$. Someone check plz
Through an experiment, it is found that selection sort performs $5000$ comparisons when sorting an array of size $k.$ If the size of array is doubled, what will be the nu...
456
views
asked
May 6, 2019
Algorithms
made-easy-test-series
algorithms
sorting
+
–
0
votes
2
answers
65
Made Easy Test Series:Algo- Asymptotic Complexity
$1)n^{2019}=O\left (n^{2020} \right )$ $2)O(n^{2019})=O\left (n^{2020} \right )$ Which one is correct?? If $1)$ is correct, why $2)$ not correct?
$1)n^{2019}=O\left (n^{2020} \right )$$2)O(n^{2019})=O\left (n^{2020} \right )$Which one is correct??If $1)$ is correct, why $2)$ not correct?
1.3k
views
asked
May 6, 2019
Algorithms
made-easy-test-series
asymptotic-notation
+
–
1
votes
1
answer
66
Array of Pointers-Self Doubt
$1)$ How to access array element with array of pointers? By pointer to an array we can access like this $(*a)[0]$,$(*a)[22]$, .. like this right? but how with array of pointer? $2)$Check these three codes , one of them use array and one of them use ... main(void) { if(*(ptr+5)==*(ptr+3)){ printf("Equal"); } else{ printf("Not Equal"); } return 0; }
$1)$ How to access array element with array of pointers? By pointer to an array we can access like this $(*a)[0]$,$(*a)[22]$,….. like thisright?but how with array of po...
838
views
asked
May 5, 2019
Programming in C
pointers
programming-in-c
+
–
7
votes
4
answers
67
Made Easy Test Series: DS-Hash Table
Consider a hash table with $N$ slots. It is given that the collision resolution technique used in chaining. Assume simple uniform hashing, what is the probability that the last $k$ slots are unfilled after the first $'r'$ insertions? $A)\left ( 1-\frac{N}{k} \right )^{r}$ ... $C)\left ( 1+\frac{N}{k} \right )^{r-1}$ $D)\left ( 1-\frac{k}{N} \right )^{r-1}$
Consider a hash table with $N$ slots. It is given that the collision resolution technique used in chaining. Assume simple uniform hashing, what is the probability that th...
5.1k
views
asked
May 5, 2019
DS
data-structures
made-easy-test-series
hashing
+
–
3
votes
3
answers
68
Made Easy Test Series:Programming-String
#include<stdio.h> #include<string.h> int main(void) { char *a="MADEEASY"; char *b="GATECSIT2019"; char *r=a; char *s=b; printf("%d",(int)strlen(b+3[r]-1[s])); return 0; } Ans is given $8.$ I know basic thing, but couldnot getting what strlen(b+3[r]-1[s]) returning?? Plz explain.
#include<stdio.h #include<string.h int main(void) { char *a="MADEEASY"; char *b="GATECSIT2019"; char *r=a; char *s=b; printf("%d",(int)strlen(b+3[r]-1[s])); return 0; }An...
1.6k
views
asked
May 4, 2019
Programming in C
made-easy-test-series
programming
programming-in-c
+
–
0
votes
1
answer
69
Doubt on Program:Self Doubt
#include <stdio.h> int main(void) { int s[6]={128,256,512,1024,2048,4096}; int *x=(int*)(&s+1); printf("%d",x); return 0; } #include <stdio.h> int main(void) { int s[6]={128,256,512,1024,2048,4096}; int *x=(int*)(&s+1); printf("%u",x); return 0; } Why both are printing different address? Is it not a fixed address of memory??
#include <stdio.h int main(void) { int s[6]={128,256,512,1024,2048,4096}; int *x=(int*)(&s+1); printf("%d",x); return 0; }#include <stdio.h int main(void) { int s[6]={128...
440
views
asked
May 4, 2019
Programming in C
programming-in-c
+
–
2
votes
0
answers
70
Made Easy Test Series:Programming-Function Call
Consider the following program: void A(int n){ printf("*"); if(n>1){ A(n/4); A(n/4); A(n/4); A(n/4); } } Let $X$ be number of asterisks printed by above function when $n=1024.$ Then the value of $X$ will be ____________ How ans will be $\frac{4^{k+1}-1}{3}$ , where $k=5?$ .
Consider the following program:void A(int n){ printf("*"); if(n>1){ A(n/4); A(n/4); A(n/4); A(n/4); } }Let $X$ be number of asterisks printed by above function when $n=10...
682
views
asked
May 4, 2019
Programming in C
made-easy-test-series
programming
programming-in-c
+
–
2
votes
0
answers
71
Made Easy Test Series:DS-Array
Consider the integer array $A\left [ 1.........100,1.......100 \right ]$ in which the elements are stored in $Z$ representation. An example of a $5\times 5$ array in $Z$ representation is shown below: If the base address of $A$ is ... $A$ is stored in Row Major Order, then the address corresponding to $A\left [ 100 \right ]\left [ 55 \right ]$ is ________________
Consider the integer array $A\left [ 1.........100,1.......100 \right ]$ in which the elements are stored in $Z$ representation. An example of a $5\times 5$ array in $Z$ ...
609
views
asked
May 4, 2019
Programming in C
made-easy-test-series
data-structures
+
–
0
votes
1
answer
72
Made Easy Test Series:DS-Binary Tree
Consider the following function foobar(), which takes binary tree as input. int foobar(struct node *root){ if(!root) return 0; if((!root->left)&&(!root->right)) return 10; else{ int i=foobar(root->left); int j=foobar(root-> ... $C)$ Sum of leaves node of binary tree. $D)$ None What return $10$ actually means?
Consider the following function foobar(), which takes binary tree as input.int foobar(struct node *root){ if(!root) return 0; if((!root->left)&&(!root->right)) return 10;...
2.0k
views
asked
May 3, 2019
DS
made-easy-test-series
data-structures
+
–
0
votes
1
answer
73
Made Easy Test Series: Programming-Recursive and Iterative Program
$I=$Iterative Program $R=$ Recursive Program $(A)$ For every program belonging to class $I$, there is an equivalent program to class $R.$ $(B)$ Every program in $R$ uses strictly more stack space compared to equivalent program in $I.$ Among $(A)$ and $(B)$ which one is correct?
$I=$Iterative Program$R=$ Recursive Program$(A)$ For every program belonging to class $I$, there is an equivalent program to class $R.$$(B)$ Every program in $R$ uses str...
326
views
asked
May 3, 2019
Programming in C
made-easy-test-series
data-structures
+
–
1
votes
1
answer
74
Made Easy Test Series: DS
A $d-$ary heap is a binary heap, but instead of $2$ children, nodes have $d$ children. A $d-ary$ heap can be represented by $1-D$ array as follows. The root is kept in $A[1]$, and it's $d$ children are kept in order in $A[2]$ through $A[d+1]$ ... $A\left [ d^{2}+d+2 \right ]$
A $d-$ary heap is a binary heap, but instead of $2$ children, nodes have $d$ children. A $d-ary$ heap can be represented by $1-D$ array as follows. The root is kept in $A...
503
views
asked
May 2, 2019
DS
made-easy-test-series
data-structures
+
–
0
votes
1
answer
75
Made Easy Test Series: Data Structure
$A)$ Rotation operation of AVL tree always preserves the inorder numbering. $B)$ If every node of BST has either $0$ or $2$ children , then searching time is $O(log n)$ Which statement is correct? Given $A)$ is correct but $B)$ is not. Plz explain how?
$A)$ Rotation operation of AVL tree always preserves the inorder numbering.$B)$ If every node of BST has either $0$ or $2$ children , then searching time is $O(log n)$Whi...
567
views
asked
May 2, 2019
DS
data-structures
made-easy-test-series
+
–
0
votes
1
answer
76
Made Easy Test Series: DFA
Min number of states in equivalent DFA ______________ will it be 4 or 5 ??
Min number of states in equivalent DFA ______________will it be 4 or 5 ??
631
views
asked
May 2, 2019
Theory of Computation
made-easy-test-series
theory-of-computation
+
–
0
votes
1
answer
77
Made Easy Test Series:TOC
The number of distinct 1 letter subword present in “NAMITA” is equal to_______________ Answer given subwords are N,A,M,I,T But last ‘A’ is not a subword. Is it correct??
The number of distinct 1 letter subword present in “NAMITA” is equal to_______________Answer given subwords are N,A,M,I,TBut last ‘A’ is not a subword. Is it cor...
602
views
asked
May 2, 2019
Theory of Computation
theory-of-computation
made-easy-test-series
+
–
3
votes
2
answers
78
Made Easy Test Series:TOC-Turing Machine
$P_{1}:$ {$<M>|M $ is a TM that accepts atleast $2$ strings of different length} $P_{2}:$ {$<M>|M $ is a TM and there exists an input whose length less than $100,$ on which $M$ halts } The number of problem which is $RE$ but not $REC$ _____________
$P_{1}:$ {$<M>|M $ is a TM that accepts atleast $2$ strings of different length}$P_{2}:$ {$<M>|M $ is a TM and there exists an input whose length less than $100,$ on whi...
1.1k
views
asked
Apr 30, 2019
Theory of Computation
theory-of-computation
turing-machine
test-series
+
–
0
votes
1
answer
79
Made Easy Test Series:Binary Tree
Consider the following function with a binary tree with atleast one node: int path(struct node *x, int len){ if(x==NULL) return B; else return A; } Assume the above function is used to check the given binary tree has any path with specified length from root to ... $B$ is $(len== -1)$ which of these two option correct? Please Explain.
Consider the following function with a binary tree with atleast one node:int path(struct node *x, int len){ if(x==NULL) return B; else return A; }Assume the above functio...
874
views
asked
Apr 30, 2019
DS
made-easy-test-series
data-structures
+
–
0
votes
1
answer
80
Made Easy Test Series:Data Structure
Assume a Binary Search Tree is not allowed to have duplicates, there is more than one way to delete a node in the tree when the node has two children.If we resolve the situation in favor of choosing element for replacement from ... ? If we resolve the situation in favor of choosing element for replacement from left substructure what this line exactly means?
Assume a Binary Search Tree is not allowed to have duplicates, there is more than one way to delete a node in the tree when the node has two children.If we resolve the si...
1.3k
views
asked
Apr 30, 2019
DS
data-structures
made-easy-test-series
+
–
Page:
« prev
1
2
3
4
5
6
7
8
9
...
35
next »
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register