Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Webpage
Programming in C.
Recursion.
Filter
Recent
Hot!
Most votes
Most answers
Most views
Previous GATE
Featured
Previous GATE Questions in Programming and DS
39
votes
6
answers
151
GATE CSE 1996 | Question: 1.13
An advantage of chained hash table (external hashing) over the open addressing scheme is Worst case complexity of search operations is less Space used is less Deletion is easier None of the above
An advantage of chained hash table (external hashing) over the open addressing scheme isWorst case complexity of search operations is lessSpace used is lessDeletion is ea...
Kathleen
13.8k
views
Kathleen
asked
Oct 9, 2014
DS
gate1996
data-structures
hashing
normal
+
–
33
votes
4
answers
152
GATE CSE 1996 | Question: 1.12
Consider the following statements: First-in-first out types of computations are efficiently supported by STACKS. Implementing LISTS on linked lists is more efficient than implementing LISTS on an array for almost all the basic LIST operations. Implementing QUEUES on a circular array is more ... $(ii)$ are true $(iii)$ and $(iv)$ are true $(ii)$ and $(iv)$ are true
Consider the following statements:First-in-first out types of computations are efficiently supported by STACKS.Implementing LISTS on linked lists is more efficient than i...
Kathleen
15.0k
views
Kathleen
asked
Oct 9, 2014
DS
gate1996
data-structures
easy
queue
stack
linked-list
+
–
25
votes
3
answers
153
GATE CSE 1995 | Question: 6
What is the number of binary trees with $3$ nodes which when traversed in post-order give the sequence $A, B, C ?$ Draw all these binary trees.
What is the number of binary trees with $3$ nodes which when traversed in post-order give the sequence $A, B, C ?$ Draw all these binary trees.
Kathleen
3.7k
views
Kathleen
asked
Oct 8, 2014
DS
gate1995
data-structures
binary-tree
normal
descriptive
+
–
21
votes
3
answers
154
GATE CSE 1995 | Question: 3
Consider the following high level programming segment. Give the contents of the memory locations for variables $W, X, Y$ and $Z$ after the execution of the program segment. The values of the variables $A$ and $B$ are $5CH$ and $92H$, respectively. Also indicate error conditions if ... integer is represented by two bytes) begin X :=A+B Y :=abs(A-B); W :=A-B Z :=A*B end;
Consider the following high level programming segment. Give the contents of the memory locations for variables $W, X, Y$ and $Z$ after the execution of the program segmen...
Kathleen
5.4k
views
Kathleen
asked
Oct 8, 2014
Programming in C
gate1995
programming
identify-function
descriptive
+
–
26
votes
3
answers
155
GATE CSE 1995 | Question: 2.22
Which of the following statements is true? As the number of entries in a hash table increases, the number of collisions increases. Recursive programs are efficient The worst case complexity for Quicksort is $O(n^2)$ Binary search using a linear linked list is efficient I and II II and III I and IV I and III
Which of the following statements is true?As the number of entries in a hash table increases, the number of collisions increases.Recursive programs are efficientThe worst...
Kathleen
11.4k
views
Kathleen
asked
Oct 8, 2014
DS
gate1995
data-structures
linked-list
hashing
+
–
49
votes
7
answers
156
GATE CSE 1995 | Question: 2.21
The postfix expression for the infix expression $A+B*(C+D)/F+D*E$ is: $AB + CD + *F/D +E*$ $ABCD + *F/DE* ++$ $A * B + CD/F *DE ++$ $A + *BCD/F* DE ++$
The postfix expression for the infix expression $A+B*(C+D)/F+D*E$ is:$AB + CD + *F/D +E*$$ABCD + *F/DE* ++$$A * B + CD/F *DE ++$$A + *BCD/F* DE ++$
Kathleen
38.3k
views
Kathleen
asked
Oct 8, 2014
DS
gate1995
data-structures
stack
easy
+
–
43
votes
6
answers
157
GATE CSE 1995 | Question: 1.17
A binary tree $T$ has $n$ leaf nodes. The number of nodes of degree $2$ in $T$ is $\log_2 n$ $n-1$ $n$ $2^n$
A binary tree $T$ has $n$ leaf nodes. The number of nodes of degree $2$ in $T$ is$\log_2 n$$n-1$$n$$2^n$
Kathleen
36.1k
views
Kathleen
asked
Oct 8, 2014
DS
gate1995
data-structures
binary-tree
normal
+
–
32
votes
3
answers
158
GATE CSE 1994 | Question: 26
A queue $Q$ containing $n$ items and an empty stack $S$ are given. It is required to transfer all the items from the queue to the stack, so that the item at the front of queue is on the TOP of the stack, and the order of all other ... which can be performed on the queue and stack are Delete, Insert, Push and Pop. Do not assume any implementation of the queue or stack.
A queue $Q$ containing $n$ items and an empty stack $S$ are given. It is required to transfer all the items from the queue to the stack, so that the item at the front of ...
Kathleen
7.5k
views
Kathleen
asked
Oct 5, 2014
DS
gate1994
data-structures
queue
stack
normal
descriptive
+
–
29
votes
6
answers
159
GATE CSE 1994 | Question: 25
An array $A$ contains $n$ integers in non-decreasing order, $A[1] \leq A[2] \leq \cdots \leq A[n]$. Describe, using Pascal like pseudo code, a linear time algorithm to find $i, j,$ such that $A[i]+A[j]=a$ given integer $M$, if such $i, j$ exist.
An array $A$ contains $n$ integers in non-decreasing order, $A \leq A \leq \cdots \leq A[n]$. Describe, using Pascal like pseudo code, a linear time algorithm to find $...
Kathleen
5.0k
views
Kathleen
asked
Oct 5, 2014
DS
gate1994
data-structures
array
normal
descriptive
+
–
1
votes
1
answer
160
GATE CSE 1994 | Question: 22
Consider the program below: Program main: var r:integer; procedure two: begin write (r); end procedure one: var r:integer; begin r:=5; two; end begin r:=2; two; one; two; end What is printed by the above program if Static scoping is assumed for all variables; Dynamic scoping is assumed for all variables. Give reasons for your answer.
Consider the program below:Program main: var r:integer; procedure two: begin write (r); end procedure one: var r:integer; begin r:=5; two; end begin r:=2; two; one; two; ...
Kathleen
1.8k
views
Kathleen
asked
Oct 5, 2014
Programming in C
gate1994
programming
variable-binding
normal
out-of-gate-syllabus
+
–
37
votes
3
answers
161
GATE CSE 1994 | Question: 21
Consider the following recursive function: function fib (n:integer);integer; begin if (n=0) or (n=1) then fib := 1 else fib := fib(n-1) + fib(n-2) end; The above function is run on a computer with a stack of $64$ bytes. Assuming ... an address takes $2$ bytes each, estimate the maximum value of $n$ for which the stack will not overflow. Give reasons for your answer.
Consider the following recursive function:function fib (n:integer);integer; begin if (n=0) or (n=1) then fib := 1 else fib := fib(n-1) + fib(n-2) end;The above function i...
Kathleen
25.5k
views
Kathleen
asked
Oct 5, 2014
Programming in C
gate1994
programming
recursion
normal
descriptive
+
–
35
votes
3
answers
162
GATE CSE 1994 | Question: 8
A rooted tree with $12$ nodes has its nodes numbered $1$ to $12$ in pre-order. When the tree is traversed in post-order, the nodes are visited in the order $3, 5, 4, 2, 7, 8, 6, 10, 11, 12, 9, 1$. Reconstruct the original tree from this information, that is, find the parent of each node, and show the tree diagrammatically.
A rooted tree with $12$ nodes has its nodes numbered $1$ to $12$ in pre-order. When the tree is traversed in post-order, the nodes are visited in the order $3, 5, 4, 2, 7...
Kathleen
7.2k
views
Kathleen
asked
Oct 5, 2014
DS
gate1994
data-structures
binary-tree
normal
descriptive
+
–
17
votes
3
answers
163
GATE CSE 1994 | Question: 5
A $3-\text{ary}$ tree is a tree in which every internal node has exactly three children. Use induction to prove that the number of leaves in a $3-\text{ary}$ tree with $n$ internal nodes is $2(n+1)$.
A $3-\text{ary}$ tree is a tree in which every internal node has exactly three children. Use induction to prove that the number of leaves in a $3-\text{ary}$ tree with $n...
Kathleen
12.9k
views
Kathleen
asked
Oct 5, 2014
DS
gate1994
data-structures
tree
proof
descriptive
+
–
35
votes
4
answers
164
GATE CSE 1994 | Question: 1.17, UGCNET-Sep2013-II: 32
Linked lists are not suitable data structures for which one of the following problems? Insertion sort Binary search Radix sort Polynomial manipulation
Linked lists are not suitable data structures for which one of the following problems?Insertion sortBinary searchRadix sortPolynomial manipulation
Kathleen
23.1k
views
Kathleen
asked
Oct 4, 2014
DS
gate1994
data-structures
linked-list
normal
ugcnetsep2013ii
+
–
33
votes
6
answers
165
GATE CSE 1994 | Question: 1.14
Which of the following permutations can be obtained in the output (in the same order) using a stack assuming that the input is the sequence $\text{1, 2, 3, 4, 5}$ in that order? $\text{3, 4, 5, 1, 2}$ $\text{3, 4, 5, 2, 1}$ $\text{1, 5, 2, 3, 4}$ $\text{5, 4, 3, 1, 2}$
Which of the following permutations can be obtained in the output (in the same order) using a stack assuming that the input is the sequence $\text{1, 2, 3, 4, 5}$ in that...
Kathleen
33.4k
views
Kathleen
asked
Oct 4, 2014
DS
gate1994
data-structures
stack
normal
+
–
75
votes
11
answers
166
GATE CSE 1994 | Question: 1.11
In a compact single dimensional array representation for lower triangular matrices (i.e all the elements above the diagonal are zero) of size $n \times n$, non-zero elements, (i.e elements of lower triangle) of each row are stored one after another, starting from the first row, the index of the ... is: $i+j$ $i+j-1$ $(j-1)+\frac{i(i-1)}{2}$ $i+\frac{j(j-1)}{2}$
In a compact single dimensional array representation for lower triangular matrices (i.e all the elements above the diagonal are zero) of size $n \times n$, non-zero eleme...
Kathleen
28.3k
views
Kathleen
asked
Oct 4, 2014
DS
gate1994
data-structures
array
normal
+
–
22
votes
2
answers
167
GATE CSE 1994 | Question: 1.5
An unrestricted use of the "$goto$" statement is harmful because it makes it more difficult to verify programs it increases the running time of the programs it increases the memory required for the programs it results in the compiler generating longer machine code
An unrestricted use of the "$goto$" statement is harmful becauseit makes it more difficult to verify programsit increases the running time of the programsit increases the...
Kathleen
3.9k
views
Kathleen
asked
Oct 4, 2014
Programming in C
gate1994
programming
easy
goto
+
–
23
votes
3
answers
168
GATE CSE 2010 | Question: 52
A hash table of length $10$ uses open addressing with hash function $h(k) = k \mod 10$, and linear probing. After inserting $6$ ... $34, 42, 23, 52, 33, 46$ $46, 34, 42, 23, 52, 33$ $42, 46, 33, 23, 34, 52$
A hash table of length $10$ uses open addressing with hash function $h(k) = k \mod 10$, and linear probing. After inserting $6$ values into an empty hash table, the table...
go_editor
6.7k
views
go_editor
asked
Sep 30, 2014
DS
gatecse-2010
data-structures
hashing
normal
+
–
41
votes
2
answers
169
GATE CSE 2010 | Question: 36
The following C function takes a singly-linked list as input argument. It modifies the list by moving the last element to the front of the list and returns the modified list. Some part of the code is left blank. typedef struct node { int value; struct node *next; ... $q \rightarrow next = NULL; p \rightarrow next = head; head = p$;
The following C function takes a singly-linked list as input argument. It modifies the list by moving the last element to the front of the list and returns the modified l...
go_editor
10.9k
views
go_editor
asked
Sep 30, 2014
DS
gatecse-2010
data-structures
linked-list
normal
+
–
19
votes
2
answers
170
GATE CSE 1993 | Question: 16
Prove by the principal of mathematical induction that for any binary tree, in which every non-leaf node has $2$-descendants, the number of leaves in the tree is one more than the number of non-leaf nodes.
Prove by the principal of mathematical induction that for any binary tree, in which every non-leaf node has $2$-descendants, the number of leaves in the tree is one more ...
Kathleen
3.0k
views
Kathleen
asked
Sep 29, 2014
DS
gate1993
data-structures
binary-tree
normal
descriptive
+
–
Page:
« prev
1
...
3
4
5
6
7
8
9
10
11
12
13
...
16
next »
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register