The Gateway to Computer Science Excellence
For all GATE CSE Questions
Toggle navigation
Facebook Login
or
Email or Username
Password
Remember
Login
Register
|
I forgot my password
Activity
Questions
Unanswered
Tags
Subjects
Users
Ask
Prev
Blogs
New Blog
Exams
Recent activity by adarsh_1997
User adarsh_1997
Wall
Recent activity
All questions
All answers
Exams Taken
All Blogs
User adarsh_1997
Wall
Recent activity
All questions
All answers
Exams Taken
All Blogs
6
answers
1
GATE2005-IT-42
Two concurrent processes $P1$ and $P2$ use four shared resources $R1, R2, R3$ and $R4$, as shown below. $\begin{array}{|l|l|}\hline \textbf{P1} & \textbf{P2} \\ \text{Compute: } & \text{Compute;} \\ \text{Use $ ... If only binary semaphores are used to enforce the above scheduling constraints, what is the minimum number of binary semaphores needed? $1$ $2$ $3$ $4$
commented
Oct 1
in
Operating System
|
3.6k
views
gate2005-it
operating-system
process-synchronization
normal
2
answers
2
GATE1990-13a
Consider the height-balanced tree $T_{t}$ with values stored at only the leaf nodes, shown in Fig.4. (i) Show how to merge to the tree, $T_{1}$ elements from tree $T_{2}$ shown in Fig.5 using node D of tree $T_{1}$. (ii) What is the time complexity of ... $T_{1}$ and $T_{2}$ are of height $h_{1}$ and $h_{2}$ respectively, assuming that rotation schemes are given. Give reasons.
commented
Sep 4
in
DS
|
738
views
gate1990
descriptive
data-structure
trees
2
answers
3
QUICK SORT- SELF DOUBT
In quick sort for sorting of n Numbers, the 75th greatest Element is selected as pivot using $O(n^2)$ time complexity algorithm than what is the worst case time complexity of quick sort. O($n^2$) O($n^3$) O(nlogn) O(n)
commented
Sep 3
in
Algorithms
|
205
views
algorithms
divide-and-conquer
quicksort
4
answers
4
GATE2013-33
Consider the DFA $A$ given below. Which of the following are FALSE? Complement of $L(A)$ is context-free. $L(A) = L((11^*0+0)(0 + 1)^*0^*1^*) $ For the language accepted by $A, A$ is the minimal DFA. $A$ accepts all strings over $\{0, 1\}$ of length at least $2$. 1 and 3 only 2 and 4 only 2 and 3 only 3 and 4 only
answered
Aug 16
in
Theory of Computation
|
3.7k
views
gate2013
theory-of-computation
finite-automata
normal
6
answers
5
GATE1996-2.13, ISRO2016-28
The average number of key comparisons required for a successful search for sequential search on $n$ items is $\frac{n}{2}$ $\frac{n-1}{2}$ $\frac{n+1}{2}$ None of the above
answered
Jul 31
in
Algorithms
|
8.7k
views
gate1996
algorithms
easy
isro2016
searching
11
answers
6
GATE2014-1-39
The minimum number of comparisons required to find the minimum and the maximum of $100$ numbers is ________
commented
Jul 31
in
Algorithms
|
13.8k
views
gate2014-1
algorithms
numerical-answers
normal
minimum-maximum
7
answers
7
GATE2007-IT-29
When searching for the key value $60$ in a binary search tree, nodes containing the key values $10, 20, 40, 50, 70, 80, 90$ are traversed, not necessarily in the order given. How many different orders are possible in which these key values can occur on the search path from the root to the node containing the value $60$? $35$ $64$ $128$ $5040$
commented
Jul 30
in
DS
|
11.9k
views
gate2007-it
data-structure
binary-search-tree
normal
4
answers
8
GATE2006-13
A scheme for storing binary trees in an array $X$ is as follows. Indexing of $X$ starts at $1$ instead of $0$. the root is stored at $X[1]$. For a node stored at $X[i]$, the left child, if any, is stored in $X[2i]$ and the right child, if any, in $X[2i+1]$. To be able to store any binary tree on n vertices the minimum size of $X$ should be $\log_2 n$ $n$ $2n+1$ $2^n-1$
commented
Jul 28
in
DS
|
3.8k
views
gate2006
data-structure
binary-tree
normal
4
answers
9
GATE2015-3-19
Consider the following array of elements. $\langle 89, 19, 50, 17, 12, 15, 2, 5, 7, 11, 6, 9, 100 \rangle$ The minimum number of interchanges needed to convert it into a max-heap is $4$ $5$ $2$ $3$
commented
Jul 27
in
DS
|
1.6k
views
gate2015-3
data-structure
heap
normal
4
answers
10
GATE2006-10
In a binary max heap containing $n$ numbers, the smallest element can be found in time $O(n)$ $O(\log n)$ $O(\log \log n)$ $O(1)$
commented
Jul 27
in
DS
|
3.5k
views
gate2006
data-structure
heap
easy
4
answers
11
GATE2016-2-37
Consider the following program: int f (int * p, int n) { if (n <= 1) return 0; else return max (f (p+1, n-1), p[0] - p[1]); } int main () { int a[] = {3, 5, 2, 6, 4}; print f(" %d", f(a, 5)); } Note: $max (x, y)$ returns the maximum of $x$ and $y$. The value printed by this program is ________.
commented
Jul 22
in
Programming
|
4.1k
views
gate2016-2
programming-in-c
normal
numerical-answers
4
answers
12
GATE2015-1-35
What is the output of the following C code? Assume that the address of $x$ is $2000$ (in decimal) and an integer requires four bytes of memory. int main () { unsigned int x [4] [3] = {{1, 2, 3}, {4, 5, 6}, {7, 8, 9}, {10, 11, 12}}; printf ("%u, %u, %u", x + 3, *(x + 3), *(x + 2) + 3); } $2036, 2036, 2036$ $2012, 4, 2204$ $2036, 10, 10$ $2012, 4, 6$
commented
Jul 19
in
Programming
|
7.8k
views
gate2015-1
programming
programming-in-c
normal
4
answers
13
GATE2014-2-42
Consider the C function given below. int f(int j) { static int i = 50; int k; if (i == j) { printf("something"); k = f(i); return 0; } else return 0; } Which one of the following is TRUE? The function returns $0$ for all values of $j$. The ... $j$. The function returns $0$ when $j = 50$. The function will exhaust the runtime stack or run into an infinite loop when $j = 50$.
commented
Jul 19
in
Programming
|
1.9k
views
gate2014-2
programming
programming-in-c
4
answers
14
GATE2014-1-10
Consider the following program in C language: #include <stdio.h> main() { int i; int*pi = &i; scanf("%d",pi); printf("%d\n", i+5); } Which one of the following statements is TRUE? Compilation fails. Execution results in a run- ... is $5$ more than the address of variable $i$. On execution, the value printed is $5$ more than the integer value entered.
commented
Jul 19
in
Programming
|
3.8k
views
gate2014-1
programming
programming-in-c
easy
7
answers
15
GATE2006-IT-49
Which one of the choices given below would be printed when the following program is executed ? #include <stdio.h> struct test { int i; char *c; }st[] = {5, "become", 4, "better", 6, "jungle", 8, "ancestor", 7, "brother"}; ... $\text{etter, u, 6, ungle}$ $\text{cetter, k, 6, jungle}$ $\text{etter, u, 8, ncestor}$
commented
Jul 19
in
Programming
|
6.5k
views
gate2006-it
programming
programming-in-c
normal
2
answers
16
GATE2004-IT-58
Consider the following C program which is supposed to compute the transpose of a given $4 \times 4$ matrix $M$. Note that, there is an $X$ in the program which indicates some missing statements. Choose the correct option to replace $X$ in the program. #include<stdio.h> #define ROW 4 #define COL 4 int M[ROW][ ... i; j < 4; ++j){ M[i][j] = t; t = M[j][i]; M[j][i] = M[i][j]; }
commented
Jul 19
in
Programming
|
1.9k
views
gate2004-it
programming
easy
programming-in-c
11
answers
17
GATE2012-12
What is the complement of the language accepted by the NFA shown below? Assume $\Sigma = \{a\}$ and $\epsilon$ is the empty string. $\phi$ $\{\epsilon\}$ $a^*$ $\{a , \epsilon\}$
answered
Jul 2
in
Theory of Computation
|
4.8k
views
gate2012
finite-automata
easy
theory-of-computation
1
answer
18
Made Easy
A hypothetical 5 stage processor is designed in which branch is predicted at 3 stage and each stage takes 1 cycle to compute its task. If f is the probability of an instruction being a branch instruction then what is the value of F such that speed up is atleast 3?
commented
Jan 23
in
CO and Architecture
|
45
views
0
answers
19
Made Easy CBT 19
What is optimal and Estimated Cost here, and why eliminate option A and C, why option B is correct.
commented
Jan 15
in
Computer Networks
|
104
views
cbt-2019
computer-networks
distance-vector-routing
0
answers
20
ME_test_series
Assume in TCP client is sending segment to server. After successfully receiving segments from client, server is waiting for next segments and clients is also waiting for acknowledgment from the server and this lead to deadlock situation. Which timer is used and who ... timer, client Keep alive timer, client I am not understand how persistent timer is used and what is it used for?
commented
Jan 13
in
Computer Networks
|
57
views
computer-networks
flow-control-methods
2
answers
21
ER Model. Please explain the answer.
Please explain the answer.
commented
Jan 11
in
Databases
|
72
views
e-r
er-diagram
relational-model
0
answers
22
Gate-2019
ER- no of tables?
commented
Jan 11
in
Databases
|
136
views
databases
1
answer
23
MadeEasy Test Series: CO & Architecture - Cache Memory
A : LRU replacement policy is not applicable to direct mapped caches B : A unique memory page is associated with every cache page in direct mapped caches Options: 1) Both True 2) Both False 3) A is True and B is false 4) B is True and A is false
commented
Jan 9
in
CO and Architecture
|
296
views
made-easy-test-series
co-and-architecture
cache-memory
direct-mapping
0
answers
24
made easy test
How many concurrent schedules are conflict serializable of given transactions T1 and T2:
commented
Jan 9
in
Databases
|
32
views
0
answers
25
MadeEasy Test Series: Databases - Sql
I got why query 2 is wrong. How do I approach to understand Query 1, is there a generic approach for solving questions like these which have no tables given?
commented
Jan 8
in
Databases
|
84
views
sql
query
databases
made-easy-test-series
0
answers
26
Natural Join
Suppose we have 2 tables R1(ABCD), R2(DE) . R1 has 500 entries whereas R2 has 1500 entries. Here D is a candidate key. If we join them using natural join. How many entires would be there in the resultant table and why ? Examples would be appreciated..
comment edited
Jan 8
in
Databases
|
78
views
natural-join
databases
0
answers
27
Number of conflict serial orderings (with commit) Applied Course FT-1
Consider the following order of transactions: T2: R(y); T3:W(y); T3: commit; T1: W(y); T1: commit; T2: R(x); T2: W(z); T2: commit; T4: R(y);T4: R(x); T4: commit. Let the above schedule be S, if S is serializable, then how many conflict serial orderings of S is possible?___________
commented
Jan 8
in
Databases
|
154
views
transaction-and-concurrency
0
answers
28
Merge Sort
Can anyone help me to understand this problem….??
commented
Jan 8
in
Algorithms
|
101
views
merge-sort
algorithms
sorting
merging
0
answers
29
PRE-ORDER, POST-ORDER IN-ORDER
Acc. to (question) my solution is... uniquely constructed binary tree PRE+POST and IN+POST… where i am wrong….
commented
Jan 8
in
Algorithms
|
100
views
tree-traversal
data-structure
1
answer
30
Reflexive Relation
Can anyone help …. where I am wrong…??
answered
Jan 8
in
Mathematical Logic
|
51
views
relations
set-theory&algebra
discrete-mathematics
0
answers
31
#madeeasy
commented
Jan 7
in
Programming
|
70
views
0
answers
32
Doubt : Recursion ( snippet by testbook )
Its always a confusion how Recursion works with for loop. Explain a brief.
commented
Jan 7
in
Programming
|
44
views
1
answer
33
MadeEasy Test Series: Compiler Design - Syntax Directed Translation
Consider the following grammar and their Syntax Directed Translation (SDT) rules. (Here id represent a integer and id.val is value of that integer) S1: Given SDT is L-attributed and using L-attributed evaluation the value of ... doubt here: Is there any difference in the way of evaluation of L-attributed SDT and S-attributed SDT ?
commented
Jan 7
in
Compiler Design
|
187
views
made-easy-test-series
compiler-design
syntax-directed-translation
2
answers
34
ME OTS 1 : Finite Automata
Doubt: ( Even if we take compliment , its wont satisfy it )
commented
Jan 7
in
Theory of Computation
|
93
views
0
answers
35
Made Easy Test Series
commented
Jan 7
in
Programming
|
43
views
1
answer
36
DIgital MUX GFG TEST
commented
Jan 7
in
Digital Logic
|
57
views
digital-logic
multiplexer
5
answers
37
GATE2004-IT-65
The semaphore variables full, empty and mutex are initialized to $0$, $n$ and $1$, respectively. Process P1 repeatedly adds one item at a time to a buffer of size $n$, and process P2 repeatedly removes one item at a time from the same buffer using the programs given below. In the ... , P(empty), V(full) P(empty), V(full), P(empty), V(full) P(empty), V(full), P(full), V(empty)
commented
Jan 6
in
Operating System
|
2.2k
views
gate2004-it
operating-system
process-synchronization
normal
1
answer
38
Compiler Design #Made_Easy_Test_Series
Let G be any grammar with the following productions: X → X + Y | Y Y → Y * Z | Z Z → (X) Z → id If LR(!) parser is used to parse the above grammar, then total how many look-a-heads are present for the item X → >Y and Z → .id in the initial state _____________. Please explain your answer.
commented
Jan 6
in
Compiler Design
|
91
views
compiler-design
parsing
0
answers
39
MadeEasy Subject Test: Databases - Er Diagram
Minimum no of table for this ER diagram
commented
Jan 6
in
Databases
|
141
views
made-easy-test-series
databases
er-diagram
1
answer
40
MadeEasy Test Series: Databases - Database Normalization
Consider a database with the following relation: Shipping (ShipName, ShipType, TripId, Cargo, Port. Date) With the following functional dependencies: sorry for not typing ,i will type it later my doubt is-isn’t partial dependency $ShipName\rightarrow ShipType$ present in new database??
commented
Jan 5
in
Databases
|
166
views
databases
database-normalization
made-easy-test-series
50,644
questions
56,531
answers
195,625
comments
101,357
users