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
First time here? Checkout the
FAQ
!
x
×
Close
Use the google search bar on side panel. It searches through all previous GATE/other questions. For hardcopy of previous year questions please see
here
Recent activity by Shaik Masthan
User Shaik Masthan
Wall
Recent activity
All questions
All answers
Exams Taken
All Blogs
User Shaik Masthan
Wall
Recent activity
All questions
All answers
Exams Taken
All Blogs
1
answer
1
finding two positive integers in an array
I'm facing a problem these days, the question is saying the following: " Imagine we are having an array of positive integers called (a) and a variable called (k). Among this integers, we are looking for two numbers such that the sum of ... 6,2 in this case what would be the designing of the algorithm? Thank you all for your efforts, they worth a lot!
answer selected
7 seconds
ago
in
Study Resources

102
views
functions
logic
algorithms
0
answers
2
IISc CSA  Research Interview Question
Prove that the rank of the Adjacency Matrix which is associated with a $k$ regular graph is $k.$
commented
May 22
in
Graph Theory

68
views
graphtheory
linearalgebra
0
answers
3
Admission through ccmt
In second round of ccmt i got nit warangal csis and if i float again for third round i can get nit surathakal cs ,so for third round should i float or internal sliding for cs of warangal ??please help
commented
May 18
in
NITs

104
views
admissions
nit
0
answers
4
Made Easy Test Series:AlgorithmDijkstra
Which of the following procedure results same output as Dijkstra’s Algo. on unweighted graph on $'n'$ verices? $A)$ BFS $B)$ DFS $C)$Kruskal $D)$ Prims As far I know Dijkstra and Prims both have $T.C.=O(E+VlogV)$ But ans given BFS. How this ans possible??
commented
May 18
in
Algorithms

41
views
madeeasytestseries
algorithms
0
answers
5
Made Easy Test Series: AlgorithmReverse Polish Notation
Consider the neworder strategy for traversing a binary tree: Visit the root Visit the right subtree using neworder Visit the left subtree using neworder The neworder traversal of expression tree corresponding to the reverse polish expression 3 4 * 5 – 2 ^ 6 7 * 1 + – What will be expression, any procedure for it??
commented
May 16
in
Compiler Design

73
views
infixpostfix
algorithms
timecomplexity
1
answer
6
GATE2011 Aptitude Set 3  GA6
The sum of $n$ terms of the series $4+44+444+ \dots \dots $ is $\frac{4}{81}\left[10^{n+1}9n1\right]$ $\frac{4}{81}\left[10^{n1}9n1\right]$ $\frac{4}{81}\left[10^{n+1}9n10\right]$ $\frac{4}{81}\left[10^{n}9n10\right]$
answered
May 15
in
Numerical Ability

54
views
generalaptitude
numericalability
gate2011aptiset3
arithmeticseries
2
answers
7
Made Easy Test Series:DatabaseSQL
Find the name of Sailors with a higher rating than all sailors with age $<22?$ $Query1: $ Select S.name from sailor S where not exists (Select * from sailor $S_{2} $where $S_{2}.age<22$ and $S.rating<=S_{2}.rating$ ... above query?? I think Query2 and Query3 itself differentiate with ANY and ALL keyword. But what about Query1? Will it return ALL tuples?
commented
May 15
in
Databases

98
views
madeeasytestseries
databases
6
answers
8
GATE2011 Aptitude Set 3  GA8
Three friends, $R, S$ and $T$ shared toffee from a bowl. $R$ took $\frac{1}{3}^{\text{rd}}$ of the toffees, but returned four to the bowl. $S$ took $\frac{1}{4}^{\text{th}}$ of what was left but returned three toffees to the bowl. $T$ ... two back into the bowl. If the bowl had $17$ toffees left, how may toffees were originally there in the bowl? $38$ $31$ $48$ $41$
answered
May 15
in
Numerical Ability

133
views
generalaptitude
numericalability
gate2011aptiset3
ratioproportion
1
answer
9
ISI2018PCBB2
You can climb up a staircase of $n$ stairs by taking steps of one or two stairs at a time. Formulate a recurrence relation for counting $a_n$, the number of distinct ways in which you can climb up the staircase. Mention the boundary conditions for your recurrence relation. Find a closed form expression for $a_n$ by solving your recurrence.
answer selected
May 14
in
Algorithms

29
views
isi2018pcbb
algorithms
recurrenceeqation
descriptive
1
answer
10
boolean aalgebra
(a) Assume the integers below are 1’s complement integers. Find the 1’s complement of each number, and give the decimal values of the original number and of its complement. (i) 0000000 (ii) 1111111 (iii) 00110011 (iv) 1000000 (b) Repeat part (a) assuming the numbers are 2’s complement numbers and finding the 2’s complement of them.
answered
May 14
in
Digital Logic

18
views
3
answers
11
GATE2010 Aptitude Set 3  GA7
Consider the series $\frac{1}{2}+\frac{1}{3}\frac{1}{4}+\frac{1}{8}+\frac{1}{9}\frac{1}{16}+\frac{1}{32}+\frac{1}{27}\frac{1}{64}+\ldots.$ The sum of the infinite series above is$:$ $\infty$ $\frac{5}{6}$ $\frac{1}{2}$ $0$
answered
May 14
in
Numerical Ability

49
views
generalaptitude
numericalability
gate2010aptiset3
numberseries
1
answer
12
TEST BOOK QUESTION
CAN SOMEBODY EXPLAIN THIS ANSWER PLZ !!!
commented
May 14
in
Digital Logic

47
views
#digitallogic
1
answer
13
Self DoubtProgramming
Can someone explain the output of this code? and what (char*) is doing actually? #include<stdio.h> struct Ournode{ char x, y, z; }; int main() { struct Ournode p={'1', '0', 'a'+2}; struct Ournode *q=&p; printf("%c, %c", '*((char*)q+1)', '*((char*)q+2)'); return 0; }
commented
May 14
in
Programming

118
views
programminginc
output
selfdoubt
1
answer
14
self doubt dfa
Given an algorithm to tell whether a regular language L contains at least 100 strings
answer selected
May 14
in
Theory of Computation

44
views
theoryofcomputation
0
answers
15
pda self doubt
The language accepted by a DPDA with a final state is more compared to the DPDA with empty stack. DPDA with empty stack accepts LR(0) grammar. Can someone explain in depth/or give good reference links?
commented
May 14
in
Theory of Computation

38
views
pushdownautomata
pushdownautomata
0
answers
16
Self Doubt : Ambiguity
Why is ambiguity in regular language is decidable and not decidable in CFL ? Can you give Example?
commented
May 10
in
Theory of Computation

82
views
theoryofcomputation
finiteautomata
ambiguous
regularlanguages
contextfreelanguage
context
3
answers
17
self doubt
What is the output of the program: extern int a; main() { extern int a; printf(a); }
commented
May 10
in
Programming

52
views
1
answer
18
Self Doubt :Bit Stuffing
End delimeter is → 0111 data to be sent 0111111111. What is the data we should send to the reciever?
commented
May 8
in
Computer Networks

109
views
computernetworks
bitstuffing
0
answers
19
UPPCL AE 2018:14
commented
May 3
in
Computer Networks

27
views
uppcl2018
0
answers
20
book name is" test ur c aptitude"
plzzz explain how this code is executed
commented
Apr 8
in
Programming

65
views
badquestion
1
answer
21
#arrays
i write this program, during initialization of array i given the size as 11 means the number of elements stored in an array is 11. as we know array is not assigned a value of index 12 and above. but in in the program array a is initialized of index from 0 to 19,my question is how the array is ... i=0;i<20;i++) { a[i]=i+1; } for(i=0;i<20;i++) { printf("%d\n",a[i]); } }
commented
Apr 7
in
Programming

95
views
programminginc
programming
arrays
array
memoryallocation
2
answers
22
self doubt
difference between empty language and empty string
commented
Apr 6
in
Theory of Computation

46
views
theoryofcomputation
1
answer
23
Cormen Edition 3 Exercise 3.1 Question 2 (Page No. 52)
Show that for any real constants $a$ and $b$, where $b > 0,$ $(n+a)^b=\Theta(n^b)$
answer selected
Apr 5
in
Algorithms

25
views
cormen
algorithms
asymptoticnotations
descriptive
1
answer
24
Self doubt
How is the problem.. Distribute 5 toys such that each of 3 child get atleast 1 Different from sum of 3 no. X+y+z=5 such that each digit >= 1. Plz explain ?
commented
Apr 5
in
Combinatory

56
views
permutationsandcombinations
0
answers
25
proving DFA stuck
This DFA fulfills: Define a function diff:{0,1}∗→Zdiff:{0,1}∗→Z, for w∈{0,1}∗w∈{0,1}∗, diff(w)=(diff(w)=(# of 1's in w)−(w)−(# of 0's in ww). Thus, diff(ϵ)=0diff(ϵ)=0; diff(0)=−1diff(0)=−1; diff(1)=1diff(1)=1. Let L={w∈{0,1}∗∣diff(w)=3m for ... the second option: ∀w∈{0,1}∗∀w∈{0,1}∗: a) if δ(q0,w)=q1δ(q0,w)=q1, then w∈L and w=0, for any a∈Z+a∈Z+. What would be the correct option?
commented
Apr 4
in
Other Colleges

16
views
finiteautomata
theoryofcomputation
#dfa
5
answers
26
GATE201927
Consider the following C program: #include <stdio.h> int r() { static int num=7; return num; } int main() { for (r();r();r()) printf(“%d”,r()); return 0; } Which one of the following values will be displayed on execution of the programs? $41$ $52$ $63$ $630$
commented
Apr 3
in
Programming

3k
views
gate2019
programminginc
0
answers
27
Programming:Self Doubt
Can somebody explain this code line by line. I am unable to get and what will be it's output? #include<stdio.h> #include<stdlib.h> void transpose(int n, const double *A, double *B, const int *lda, int *perm) { } int transpose_equal(const double *A, ... , B, r_dim, r_perm); transpose_equal(A, B, total); free(A); free(B); free(B_trans); printf("\n"); } }
commented
Apr 3
in
Programming

56
views
programminginc
output
2
answers
28
UGC NET 2016
Let L be the language generated by regular expression 0*10* and accepted by the deterministic finite automata M. Consider the relation RM defined by M. As all states are reachable from the start state, RM has _____ equivalence classes. pls give a detailed solution
answer selected
Apr 3
in
Theory of Computation

109
views
#dfa
finiteautomata
equivalenceclasses
regularlanguages
regularexpressions
0
answers
29
self doubt
In this answer, how is the number of conflict equivalent schedule equal to T1>T2 equal to 1(How is it being calculated). And how is the number of conflict equivalent schedule equal to T2>T1 being calculated??It is very confusing please Help!!!!!
commented
Apr 2
in
Databases

38
views
conflictserializable
databases
selfdoubt
0
answers
30
Carl Hamacher: Machine Instruction and ProgramsChapter $2$
Register $R_{1}$ and $R_{2}$ of a computer contain the decimal values $1200$ and $4600$ . What is the effective address of the memory operand in each of the following instructions? $\left ( a \right )$ $Load$ ... //Auto Decrement $\left ( e \right )$ $Subtract$ $\left ( R_{1} \right )+,R_{5}$ Ans1200//Autoincrement
commented
Apr 2
in
CO & Architecture

44
views
coandarchitecture
carlhamacher
2
answers
31
Made Easy Workbook
#include <stdio.h> int main() { int i = 258; int *iptr = &i; printf("%d",*(char*)iptr); printf("%d",*(char*)iptr+1); } Please explain the solution.
commented
Mar 31
in
Programming

85
views
programminginc
2
answers
32
c functions
#include <stdio.h> void demo() { printf("GeeksQuiz "); } int main() { demo(); return 0; } ****************************************************************************** #include <stdio.h> int main() { demo(); return 0; } void demo() { printf("GeeksQuiz "); } will both program same result?
commented
Mar 31
in
Programming

61
views
0
answers
33
Ace Test Series: DatabasesSql Query
Given the following schema: employees(empid, firstname, lastname, hiredate, deptid, salary) departments(deptid, deptname, managerid, locationid) You want to display the last names and hire dates of all latest hires in their ... pairwise comparison. $3.$It executes but does not give the correct result. $4.$It executes and gives the correct result.
commented
Mar 29
in
Databases

46
views
databases
acetestseries
sql
1
answer
34
Self Doubts:
Q. An SJF algorithm is simply a priority algorithm where the priority is : A) predicted next cpu burst B) The inverse of the predicted next cpu burst C) the current cpu burst D)anything the user want so in this what will be the ans it's a) or c) ? I confused with these two options.please gives proper explanation.
commented
Mar 29
in
Operating System

61
views
operatingsystem
0
answers
35
Turing Machine: Self doubt
What is the difference between Turing recognizable language and Turing decidable language? Please someone explain me clearly the concept
commented
Mar 26
in
Theory of Computation

47
views
#selfdoubt
1
answer
36
Aptitude
Ramon wants to cut a rectangular board into identical squares pieces. If the board is 18 inches by 30 inches, what is the least number of square pieces he can cut without wasting any of the board? Ans given is 15
answered
Mar 22
in
Numerical Ability

77
views
3
answers
37
GATE201915
For $\Sigma = \{a ,b \}$, let us consider the regular language $L=\{x \mid x = a^{2+3k} \text{ or } x=b^{10+12k}, k \geq 0\}$. Which one of the following can be a pumping length (the constant guaranteed by the pumping lemma) for $L$ ? $3$ $5$ $9$ $24$
comment edited
Mar 19
in
Theory of Computation

3k
views
gate2019
theoryofcomputation
pumpinglemma
0
answers
38
Time complexity
Is this the correct way to solve ? Q) int algorithm(int n) { int sum =0;k,j; for (k=0;k<n/2;k++) for(j=0;j<10;j++) sum++; return 4*algorithm(n/2)*algorithm(n/2)+algorithm(n/2)*algorithm(n/2) }
comment reshown
Mar 16
in
Algorithms

116
views
timecomplexity
algorithms
recurrence
1
answer
39
Gateforum Test Series: Programming & DS  Programming In C
Can anyone explain how will the second parameter gets passed ?
comment moved
Mar 14
in
Programming

99
views
gateforumtestseries
programming
programminginc
1
answer
40
UGCNETDEC2018II46
Consider the following pseudocode fragment, where $m$ is a nonnegative integer that has been initialized: $p=0$ $k=0$ while $(k<m) $p=p+2^k$ $ ... $p=2^k1$ and $0 \leq k \leq m$ $p=2^{k+1}1$ and $0 \leq k \leq m$
comment edited
Mar 13
in
Others

217
views
ugcnetdec2018ii
49,534
questions
54,122
answers
187,321
comments
71,040
users