Login
Register
@
Dark Mode
Profile
Edit my Profile
Messages
My favorites
Register
Activity
Q&A
Questions
Unanswered
Tags
Subjects
Users
Ask
Previous Years
Blogs
New Blog
Exams
Dark Mode
Webpage
Programming in C.
Recursion.
Filter
Recent
Hot!
Most votes
Most answers
Most views
Previous GATE
Featured
Most answered questions in Programming and DS
168
votes
17
answers
1
GATE CSE 2016 Set 2 | Question: 40
The number of ways in which the numbers $1, 2, 3, 4, 5, 6, 7$ can be inserted in an empty binary search tree, such that the resulting tree has height $6$, is _________. Note: The height of a tree with a single node is $0$.
Akash Kanase
asked
in
DS
Feb 12, 2016
by
Akash Kanase
49.6k
views
gatecse-2016-set2
data-structures
binary-search-tree
normal
numerical-answers
67
votes
14
answers
2
GATE CSE 2018 | Question: 46
The number of possible min-heaps containing each value from $\{1,2,3,4,5,6,7\}$ exactly once is _______
gatecse
asked
in
DS
Feb 14, 2018
by
gatecse
38.8k
views
gatecse-2018
binary-heap
numerical-answers
combinatory
2-marks
69
votes
13
answers
3
GATE CSE 2017 Set 2 | Question: 55
Consider the following C program. #include<stdio.h> #include<string.h> int main() { char* c="GATECSIT2017"; char* p=c; printf("%d", (int)strlen(c+2[p]-6[p]-1)); return 0; } The output of the program is _______
Madhav
asked
in
Programming in C
Feb 14, 2017
by
Madhav
27.6k
views
gatecse-2017-set2
programming-in-c
numerical-answers
array
pointers
172
votes
13
answers
4
GATE IT 2007 | Question: 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$
Ishrat Jahan
asked
in
DS
Oct 29, 2014
by
Ishrat Jahan
39.1k
views
gateit-2007
data-structures
binary-search-tree
normal
143
votes
12
answers
5
GATE CSE 2016 Set 1 | Question: 41
Let $Q$ denote a queue containing sixteen numbers and $S$ be an empty stack. $Head(Q)$ returns the element at the head of the queue $Q$ without removing it from $Q$. Similarly $Top(S)$ returns the element at the top of $S$ without removing ... = Pop(S); Enqueue (Q, x); end end The maximum possible number of iterations of the while loop in the algorithm is _______.
Sandeep Singh
asked
in
DS
Feb 12, 2016
by
Sandeep Singh
34.7k
views
gatecse-2016-set1
data-structures
queue
difficult
numerical-answers
42
votes
12
answers
6
GATE CSE 2015 Set 3 | Question: 25
Consider a binary tree T that has $200$ leaf nodes. Then the number of nodes in T that have exactly two children are ______.
go_editor
asked
in
DS
Feb 14, 2015
by
go_editor
23.9k
views
gatecse-2015-set3
data-structures
binary-tree
normal
numerical-answers
35
votes
12
answers
7
GATE CSE 2015 Set 2 | Question: 10
A binary tree T has $20$ leaves. The number of nodes in T having two children is ______.
go_editor
asked
in
DS
Feb 12, 2015
by
go_editor
30.1k
views
gatecse-2015-set2
data-structures
binary-tree
normal
numerical-answers
57
votes
12
answers
8
GATE CSE 2010 | Question: 10
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{(n-1)}{2}$ $n-1$
go_editor
asked
in
DS
Sep 29, 2014
by
go_editor
16.2k
views
gatecse-2010
data-structures
binary-tree
normal
89
votes
12
answers
9
GATE CSE 2003 | Question: 64
Let S be a stack of size $n \geq1$. Starting with the empty stack, suppose we push the first n natural numbers in sequence, and then perform $n$ pop operations. Assume that Push and Pop operations take $X$ seconds each, and $Y$ seconds elapse between the end of one such ... S. The average stack-life of an element of this stack is $n(X+Y)$ $3Y+2X$ $n(X+Y)-X$ $Y+2X$
Kathleen
asked
in
DS
Sep 17, 2014
by
Kathleen
30.8k
views
gatecse-2003
data-structures
stack
normal
37
votes
11
answers
10
GATE CSE 2021 Set 2 | Question: 10
Consider the following $\text{ANSI C}$ program. #include <stdio.h> int main() { int arr[4][5]; int i, j; for (i=0; i<4; i++) { for (j=0; j<5; j++) { arr[i][j] = 10 * i + j; } } printf(“%d”, *(arr[1]+9)); return 0; } What is the output of the above program? $14$ $20$ $24$ $30$
Arjun
asked
in
Programming in C
Feb 18, 2021
by
Arjun
29.9k
views
gatecse-2021-set2
programming-in-c
array
output
1-mark
85
votes
11
answers
11
GATE CSE 2017 Set 1 | Question: 08
Consider the C code fragment given below. typedef struct node { int data; node* next; } node; void join(node* m, node* n) { node* p = n; while(p->next != NULL) { p = p->next; } p->next = m; } Assuming that m and n ... append list m to the end of list n. cause a null pointer dereference for all inputs. append list n to the end of list m for all inputs.
khushtak
asked
in
DS
Feb 14, 2017
by
khushtak
25.6k
views
gatecse-2017-set1
data-structures
linked-list
normal
47
votes
11
answers
12
GATE CSE 2017 Set 1 | Question: 35
Consider the following two functions. void fun1(int n) { if(n == 0) return; printf("%d", n); fun2(n - 2); printf("%d", n); } void fun2(int n) { if(n == 0) return; printf("%d", n); ... printf("%d", n); } The output printed when $\text{fun1}(5)$ is called is $53423122233445$ $53423120112233$ $53423122132435$ $53423120213243$
Arjun
asked
in
Programming in C
Feb 14, 2017
by
Arjun
20.2k
views
gatecse-2017-set1
programming
normal
tricky
recursion
35
votes
11
answers
13
GATE CSE 2017 Set 2 | Question: 13
A circular queue has been implemented using a singly linked list where each node consists of a value and a single pointer pointing to the next node. We maintain exactly two external pointers FRONT and REAR pointing to the front node and the rear node of the queue, respectively ... to the front node. (I) only. (II) only. Both (I) and (II). Neither (I) nor (II).
Madhav
asked
in
DS
Feb 14, 2017
by
Madhav
27.3k
views
gatecse-2017-set2
data-structures
queue
30
votes
11
answers
14
GATE CSE 2017 Set 2 | Question: 14
Consider the following function implemented in C: void printxy(int x, int y) { int *ptr; x=0; ptr=&x; y=*ptr; *ptr=1; printf(“%d, %d”, x, y); } The output of invoking $printxy(1,1)$ is: $0, 0$ $0, 1$ $1, 0$ $1, 1$
Madhav
asked
in
Programming in C
Feb 14, 2017
by
Madhav
9.6k
views
gatecse-2017-set2
programming-in-c
identify-function
pointers
44
votes
11
answers
15
GATE CSE 2016 Set 1 | Question: 35
What will be the output of the following $C$ program? void count (int n) { static int d=1; printf ("%d",n); printf ("%d",d); d++; if (n>1) count (n-1); printf ("%d",d); } void main(){ count (3); } $3 \ 1 \ 2 \ 2 \ 1 \ 3 \ 4 \ 4 \ 4$ $3 \ 1 \ 2 \ 1 \ 1 \ 1 \ 2 \ 2 \ 2$ $3 \ 1 \ 2 \ 2 \ 1 \ 3 \ 4$ $3 \ 1 \ 2 \ 1 \ 1 \ 1 \ 2$
Sandeep Singh
asked
in
Programming in C
Feb 12, 2016
by
Sandeep Singh
15.4k
views
gatecse-2016-set1
programming-in-c
recursion
normal
61
votes
11
answers
16
GATE CSE 2015 Set 3 | Question: 26
Consider the following C program #include<stdio.h> int main() { static int a[] = {10, 20, 30, 40, 50}; static int *p[] = {a, a+3, a+4, a+1, a+2}; int **ptr = p; ptr++; printf("%d%d", ptr-p, **ptr); } The output of the program is _______.
go_editor
asked
in
Programming in C
Feb 15, 2015
by
go_editor
22.4k
views
gatecse-2015-set3
programming
programming-in-c
normal
numerical-answers
pointers
57
votes
11
answers
17
GATE IT 2006 | Question: 9
In a binary tree, the number of internal nodes of degree $1$ is $5$, and the number of internal nodes of degree $2$ is $10$. The number of leaf nodes in the binary tree is $10$ $11$ $12$ $15$
Ishrat Jahan
asked
in
DS
Oct 31, 2014
by
Ishrat Jahan
26.0k
views
gateit-2006
data-structures
binary-tree
normal
41
votes
11
answers
18
GATE IT 2007 | Question: 30
Suppose you are given an implementation of a queue of integers. The operations that can be performed on the queue are: $isEmpty (Q)$ - returns true if the queue is empty, false otherwise. $delete (Q)$ - deletes the element at the front of the queue ... the front of the queue $Q$ and inserts it at the rear keeping the other elements in the same order Empties the queue $Q$
Ishrat Jahan
asked
in
DS
Oct 29, 2014
by
Ishrat Jahan
16.2k
views
gateit-2007
data-structures
queue
normal
62
votes
11
answers
19
GATE IT 2007 | Question: 28
Consider a hash function that distributes keys uniformly. The hash table size is $20$. After hashing of how many keys will the probability that any new key hashed collides with an existing one exceed $0.5$. $5$ $6$ $7$ $10$
Ishrat Jahan
asked
in
DS
Oct 29, 2014
by
Ishrat Jahan
29.0k
views
gateit-2007
data-structures
hashing
probability
normal
75
votes
11
answers
20
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}$
Kathleen
asked
in
DS
Oct 4, 2014
by
Kathleen
28.0k
views
gate1994
data-structures
array
normal
Page:
1
2
3
4
5
6
...
309
next »
Subscribe to GATE CSE 2024 Test Series
Subscribe to GO Classes for GATE CSE 2024
Quick search syntax
tags
tag:apple
author
user:martin
title
title:apple
content
content:apple
exclude
-tag:apple
force match
+apple
views
views:100
score
score:10
answers
answers:2
is accepted
isaccepted:true
is closed
isclosed:true
Recent Posts
Post GATE 2024 Guidance [Counseling tips and resources]
GATE CSE 2024 Result Responses
[Project Contest] Pytorch backend support for MLCommons Cpp Inference implementation
Participating in MLCommons Inference v4.0 submission (deadline is February 23 12pm IST)
IIITH PGEE 2024 Test Series by GO Classes
Subjects
All categories
General Aptitude
(3.5k)
Engineering Mathematics
(10.4k)
Digital Logic
(3.6k)
Programming and DS
(6.2k)
Programming
(4.1k)
DS
(2.0k)
Algorithms
(4.8k)
Theory of Computation
(6.9k)
Compiler Design
(2.5k)
Operating System
(5.2k)
Databases
(4.8k)
CO and Architecture
(4.0k)
Computer Networks
(4.9k)
Artificial Intelligence
(79)
Machine Learning
(48)
Data Mining and Warehousing
(25)
Non GATE
(1.4k)
Others
(2.7k)
Admissions
(684)
Exam Queries
(1.6k)
Tier 1 Placement Questions
(17)
Job Queries
(80)
Projects
(11)
Unknown Category
(870)
64.3k
questions
77.9k
answers
244k
comments
80.0k
users
Recent Blog Comments
category ?
Hi @Arjun sir, I have obtained a score of 591 in ...
download here
Can you please tell about IIT-H mtech CSE self...
Please add your admission queries here:...
Network Sites
GO Mechanical
GO Electrical
GO Electronics
GO Civil
CSE Doubts
Aptitude Overflow