GATE CSE
For all GATE CSE Questions
Toggle navigation
GATE Overflow
Facebook Login
Google Login
or
Email or Username
Password
Remember
Login
Register

I forgot my password
All Activity
Questions
Unanswered
Tags
Subjects
Users
Ask
Previous
Blogs
New Blog
Exams
First time here? Checkout the
FAQ
!
x
×
Close
Use the google search bar on side panel. It searches through all previous GATE/other questions.
Recent activity by srestha
User srestha
Wall
Recent activity
All questions
All answers
Exams Taken
All Blogs
User srestha
Wall
Recent activity
All questions
All answers
Exams Taken
All Blogs
1
answer
1
Self doubt
Design a dfa in which accepts all the strings in which every prefix the difference of 0 and 1 is not more than 2?
commented
14 hours
ago
in
Theory of Computation

18
views
theoryofcomputation
1
answer
2
Indexing
Consider a disk with block size B=512 bytes. A block pointer is P=6 bytes long,and a record pointer is P R =7 bytes long. A file has r=30,000 EMPLOYEE records of fixedlength. Each record size is fixed 50 bytes. Find out the no. Of block b requires .assuming an unspanned organization.
commented
14 hours
ago
in
Databases

47
views
indexing
4
answers
3
GATE1992_02,vii
Choose the correct alternatives (more than one may be correct) and write the corresponding letters only: A $23$ tree is such that All internal nodes have either $2$ or $3$ children All paths from root to the leaves have the same length. The number of internal nodes of a $23$ tree having $9$ leaves could be (a). 4 (b). 5 (c). 6 (d). 7
commented
14 hours
ago
in
DS

426
views
gate1992
trees
datastructure
normal
0
answers
4
Complete lattice and Bounded lattice
commented
14 hours
ago
in
Set Theory & Algebra

18
views
settheory&algebra
0
answers
5
Doubt: Little Endian and Big Endian
commented
15 hours
ago
in
CO & Architecture

38
views
co&architecture
computer
2
answers
6
GATE1994_21
Consider the following recursive function: function fib (n:integer);integer; begin if (n=0) or (n=1) then fib := 1 else fib := fib(n1) + fib(n2) end; The above function is run on a computer with a stack of $64$ ... and an address takes $2$ bytes each, estimate the maximum value of $n$ for which the stack will not overflow. Give reasons for your answer.
commented
18 hours
ago
in
Programming

626
views
gate1994
programming
recursion
normal
1
answer
7
K. Rosen: Probability
Why is it 7 in the denominator?
commented
3 days
ago
in
Probability

46
views
kennethrosen
engineeringmathematics
probability
2
answers
8
probability
5 cards are drawn successively with replacement from well shuffled deck of 52 cards. What is the probability that i) all the five cards are spades ii) only 3 cards are spades iii) none is a spade.
commented
3 days
ago
in
Probability

37
views
1
answer
9
Discrete
Consider the graph G given below. The graph G is (a) planar (b) non planar
comment edited
3 days
ago
in
Others

31
views
discrete
1
answer
10
Discrete
Find the Chromatic Index of the graph G given below. (a) 3 (b) 4 (c) 2 (d) None of the above
answer selected
3 days
ago
in
Others

20
views
discrete
1
answer
11
GATE19928
Let $T$ be a Depth First Tree of a undirected graph $G$. An array $P$ indexed by the vertices of $G$ is given. $P[V]$ is the parent of vertex $V$, in $T$. Parent of the root is the root itself. Give a method for finding ... the length of the cycle. Describe the algorithm in a PASCAL (C)  like language. Assume that the variables have been suitably declared.
answer selected
3 days
ago
in
Algorithms

274
views
gate1992
algorithms
descriptive
algorithmdesign
1
answer
12
Data Structure
Assume that there are two lower triangular matrices P and Q of size $m\times m$.If matrix P and transpose of Q are fit into rectangular matrix R of size $m\times\left ( m+1 \right )$ then (A) R[i,j+1]=Q[i,j] (B) R[j,i+1]=Q[i,j] (C) R[j+1,i]=Q[i,j] (D)None of above
commented
3 days
ago
in
DS

34
views
datastructure
2
answers
13
GATE199209
Suggest a data structure for representing a subset $S$ of integers from $1$ to $n$. Following operations on the set $S$ are to be performed in constant time (independent of cardinality of $S$). (i). MEMBER (X): ... like language. You may assume that the data structure has been suitable initialized. Clearly state your assumptions regarding initialization.
commented
3 days
ago
in
DS

320
views
gate1992
datastructure
normal
descriptive
queues
2
answers
14
GATE199207b
Consider the function F(n) for which the pseudocode is given below : Function F(n) begin F1 ← 1 if(n=1) then F ← 3 else For i = 1 to n do begin C ← 0 For j = 1 to n – 1 do begin C & ... F1 * C end F = F1 end [n is a positive integer greater than zero] Solve the recurrence relation for a closed form solution of F(n).
commented
4 days
ago
in
Algorithms

259
views
gate1992
algorithms
recurrence
descriptive
3
answers
15
GATE1991_13
Give an optimal algorithm in pseudocode for sorting a sequence of $n$ numbers which has only $k$ distinct numbers ($k$ is not known a Priori). Give a brief analysis for the timecomplexity of your algorithm.
commented
4 days
ago
in
Algorithms

626
views
gate1991
sorting
timecomplexity
algorithms
difficult
1
answer
16
GATE1991_14,c
Consider the binary tree in the figure below: Outline a procedure in Pseudocode to delete an arbitrary node from such a binary tree with n nodes that preserves the structures. What is the worstcasetimecomplexity of your procedure?
comment edited
4 days
ago
in
DS

289
views
gate1991
normal
datastructure
binarytree
timecomplexity
0
answers
17
Paging question
TLB lookup time (th) = 20 ns TLB hit ratio (ht) = 99% Memory access time (ts) = 100 ns Page fault rate (hp) =0.05 Swap page time (in or out) (tp) = 5000,000 ns What is the effective access time (EAT) if we assume that all pages currently in main memory are dirty? 5118.91 ns 51.21 ns 5121ns None of the above Is the answer 5121 ?
commented
4 days
ago
in
Operating System

32
views
operatingsystem
3
answers
18
GATE19903iv
Choose the correct alternatives (More than one may be correct). The total external path length, EPL, of a binary tree with $n$ external nodes is, $EPL= \sum_{w} Iw$, where $I_{w}$ is the path length of external node $w$), $\leq n^{2}$ always. $\geq n \log_{2} n$ always. Equal to $n^{2}$ always. $O(n)$ for some special trees.
answered
4 days
ago
in
DS

108
views
gate1990
normal
datastructure
binarytree
2
answers
19
GATE199011b
The following program computes values of a mathematical function $f(x)$. Determine the form of $f(x)$. main () { int m, n; float x, y, t; scanf ("%f%d", &x, &n); t = 1; y = 0; m = 1; do { t *= (x/m); y += t; } while (m++ < n); printf ("The value of y is %f", y); }
answered
4 days
ago
in
Algorithms

88
views
gate1990
descriptive
algorithms
identifyfunction
6
answers
20
GATE2007IT83
The head of a hard disk serves requests following the shortest seek time first (SSTF) policy. The head is initially positioned at track number 180. What is the maximum cardinality of the request set, so that the head changes its direction after servicing every request if the total number of tracks are 2048 and the head can start from any track? 9 10 11 12
commented
4 days
ago
in
Operating System

1.7k
views
gate2007it
operatingsystem
diskscheduling
normal
2
answers
21
GATE199013a
Consider the heightbalanced 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 ... $T_{1}$ and $T_{2}$ are of height $h_{1}$ and $h_{2}$ respectively, assuming that rotation schemes are given. Give reasons.
answered
4 days
ago
in
DS

115
views
gate1990
descriptive
datastructure
trees
1
answer
22
GATE199017a
Express $T(n)$ in terms of the harmonic number $H_{n}= \sum_{t=1}^{n} 1/i, n \geq 1$, where $T(n)$ satisfies the recurrence relation, $T(n)=\frac{n+1}{n} T(n  1)+1$, for $n \geq \sum$ and $T(1) = 1$ What is the asymptotic behaviour of $T(n)$ as a function of $n$?
answer selected
4 days
ago
in
Algorithms

184
views
gate1990
descriptive
algorithms
recurrence
1
answer
23
[Programming] What is the output of the following programme ?
answer selected
5 days
ago
in
Programming

95
views
programminginc
output
pointers
arrays
2
answers
24
C Programming
What will be output of below program #include<stdio.h> int tech(int,int); int main(void){ int a=tech(15,4); printf("%d",a); return 0; } int tech(int p,int q){ if(p%q==0) return q; else tech(q,p%q); }
commented
5 days
ago
in
Programming

56
views
programminginc
4
answers
25
GATE2014327
Every host in an IPv4 network has a $1$second resolution realtime clock with battery backup. Each host needs to generate up to 1000 unique identifiers per second. Assume that each host has a globally unique IPv4 address. Design a ... globally unique ID for this purpose. After what period (in seconds) will the identifiers generated by a host wrap around?
answer selected
5 days
ago
in
Computer Networks

2.4k
views
gate20143
computernetworks
ipv4
numericalanswers
normal
0
answers
26
#binary tree
commented
5 days
ago
in
DS

20
views
0
answers
27
#programming
closed
5 days
ago
in
DS

19
views
3
answers
28
GATE 2016136
What will be the output of the following pseudocode when parameters are passed by reference and dynamic scoping is assumed? a = 3; void n(x) { x = x * a; print (x); } void m(y) { a = 1 ; a = y  a; n(a); print (a); } void main () { m(a); } $6,2$ $6,6$ $4,2$ $4,4$
commented
5 days
ago
in
Compiler Design

3.3k
views
gate20161
parameterpassing
normal
1
answer
29
Database
1 R(ABCD) FD'S ARE {AB>C ,C>D,D>EA ,DE>F,EF>B} 2R(ABCD) FDS ARE { A>BC, CD>E, B>D,EA} 3 R(ABCD) {AB> CD,C>B,D>C} Find the candidate key ??? For above questions and please explain too.
commented
5 days
ago
in
Databases

37
views
databases
functionaldependencies
datadependences
0
answers
30
Doubt regarding Turing Machine
I have read that T.M does not accept ε , but then in questions I have read T.M taking input ε ? Well, if T.M can't accept ε then why we are giving T.M the input ε ? Thank you!
commented
5 days
ago
in
Theory of Computation

58
views
theoryofcomputation
turingmachine
selfdoubt
decidability
1
answer
31
3.Array
Consider a stack is implemented using an array. What is worst case time complexity of push operation? give explanation
commented
5 days
ago
in
DS

41
views
arrays
datastructure
1
answer
32
4.Programming
int main() { char ch=1; while(ch<256) ch++; printf("loop end"); return 0; } My doubt here is , will it give undefined behaviour? As we are storing integer value inside character variable and also is incrementation of character pointer will give some error?
commented
5 days
ago
in
Programming

54
views
programminginc
programming
1
answer
33
2. Linked List
Consider the given Doubly Linked List: Consider C like language code snippet with respect to doubly linked list given "p" is pointer to linked list node p=first>next>next>next>prev; p>next>next>prev=p; printf("%d",p>next>next>prev>next>data); What is the output?Plz explain
commented
5 days
ago
in
DS

60
views
linkedlists
datastructure
2
answers
34
1.Programming
int main() { char str[10]="GATE2018"; int length=strlen(str); str[length]='\0'; for(i=0;str[i];i++) printf("%c",str[i]); return 0; } Find the output?
answer selected
5 days
ago
in
Programming

53
views
programminginc
programming
6
answers
35
GATE201010
In a binary tree with $n$ nodes, every node has an odd number of descendants. Every node is considered to be its own descendant. What is the number of nodes in the tree that have exactly one child? $0$ $1$ $\frac{(n1)}{2}$ $n1$
commented
6 days
ago
in
DS

1.2k
views
gate2010
datastructure
binarytree
normal
3
answers
36
GATE201247
The height of a tree is defined as the number of edges on the longest path in the tree. The function shown in the pseudocode below is invoked as height(root) to compute the height of a binary tree rooted at the tree pointer root. B1: $(1+\text{height}(n \to \text{ ... B2: $\max(h1, h2) $ B1: $(1+ \text{height}(n \to \text{ right}))$ ; B2: $\max(h1, h2)$
commented
6 days
ago
in
DS

963
views
gate2012
datastructure
binarytree
normal
1
answer
37
Context Free Languages
Which of the following is CFL? 1. $L=\{a^{m}b^{n}c^{p}d^{q}m+q=n+p\}$ 2.$L=\{a^{m}b^{n}c^{p}d^{q}m+p=n+q\}$ Please also describe the logic of PDA.
commented
6 days
ago
in
Theory of Computation

86
views
contextfreelanguages
2
answers
38
GATE20123
What will be the output of the following C program segment? char inChar = 'A'; switch ( inChar ) { case 'A' : printf ("Choice A\ n"); case 'B' : case 'C' : printf ("Choice B"); case 'D' : case 'E' : default : ... Choice"); } (A) No Choice (B) Choice A (C) Choice A Choice B No Choice (D) Program gives no output as it is erroneous
commented
6 days
ago
in
Programming

680
views
gate2012
programming
easy
programminginc
1
answer
39
GATE2012_36
Consider the program given below, in a blockstructured pseudolanguage with lexical scoping and nesting of procedures permitted. Program main; Var ... Procedure A1; Var ... Call A2; End A1 Procedure A2; Var ... Procedure A21; Var ... Call A1; ... ; A1 > A2 > A21 > A1 The correct set of activation records along with their access links is given by
commented
Oct 16
in
Programming

1.3k
views
gate2012
programming
runtimeenvironments
normal
3
answers
40
GATE201249
Consider the following C code segment. int a, b, c = 0; void prtFun(void); main() { static int a = 1; /* Line 1 */ prtFun(); a += 1; prtFun(); printf(“ \n %d %d ”, a, b); } void prtFun(void) { static int a = 2; /* Line 2 */ int b = 1; a += + ... by register int a = 2; (A) 3 1 4 1 4 2 (B) 4 2 6 1 6 1 (C) 4 2 6 2 2 0 (D) 4 2 4 2 2 0
comment edited
Oct 16
in
Programming

769
views
normal
gate2012
programminginc
programming
27,421
questions
35,271
answers
84,571
comments
33,506
users