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
64
votes
7
answers
81
GATE IT 2005 | Question: 50
In a binary tree, for every node the difference between the number of nodes in the left and right subtrees is at most $2$. If the height of the tree is $h > 0$, then the minimum number of nodes in the tree is $2^{h-1}$ $2^{h-1} + 1$ $2^h - 1$ $2^h$
Ishrat Jahan
asked
in
DS
Nov 3, 2014
by
Ishrat Jahan
22.5k
views
gateit-2005
data-structures
binary-tree
normal
53
votes
7
answers
82
GATE IT 2005 | Question: 12
The numbers $1, 2, .\dots n$ are inserted in a binary search tree in some order. In the resulting tree, the right subtree of the root contains $p$ nodes. The first number to be inserted in the tree must be $p$ $p + 1$ $n - p$ $n - p + 1$
Ishrat Jahan
asked
in
DS
Nov 3, 2014
by
Ishrat Jahan
13.4k
views
gateit-2005
data-structures
normal
binary-search-tree
54
votes
7
answers
83
GATE CSE 1996 | Question: 4
A binary search tree is used to locate the number $43$ ...
Kathleen
asked
in
DS
Oct 9, 2014
by
Kathleen
22.8k
views
gate1996
data-structures
binary-search-tree
normal
descriptive
49
votes
7
answers
84
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 ++$
Kathleen
asked
in
DS
Oct 8, 2014
by
Kathleen
38.1k
views
gate1995
data-structures
stack
easy
48
votes
7
answers
85
GATE CSE 1997 | Question: 4.5
A binary search tree contains the value $1, 2, 3, 4, 5, 6, 7, 8$. The tree is traversed in pre-order and the values are printed out. Which of the following sequences is a valid output? $5 \ 3 \ 1 \ 2 \ 4 \ 7 \ 8 \ 6$ $5 \ 3 \ 1 \ 2 \ 6 \ 4 \ 8 \ 7$ $5 \ 3 \ 2 \ 4 \ 1 \ 6 \ 7 \ 8$ $5 \ 3 \ 1 \ 2 \ 4 \ 7 \ 6 \ 8$
Kathleen
asked
in
DS
Sep 29, 2014
by
Kathleen
37.3k
views
gate1997
data-structures
binary-search-tree
normal
56
votes
7
answers
86
GATE CSE 2014 Set 3 | Question: 41
Consider the pseudocode given below. The function $DoSomething()$ takes as argument a pointer to the root of an arbitrary tree represented by the $leftMostChild-rightSibling$ representation. Each node of the tree is of type $treeNode$. typedef struct ... height of the tree. number of nodes without a right sibling in the tree. number of leaf nodes in the tree
go_editor
asked
in
DS
Sep 28, 2014
by
go_editor
19.8k
views
gatecse-2014-set3
data-structures
tree
normal
101
votes
7
answers
87
GATE CSE 2002 | Question: 2.12
A weight-balanced tree is a binary tree in which for each node, the number of nodes in the left sub tree is at least half and at most twice the number of nodes in the right sub tree. The maximum possible height (number of nodes on the path from the root to the furthest ... which of the following? $\log_2 n$ $\log_{\frac{4}{3}} n$ $\log_3 n$ $\log_{\frac{3}{2}} n$
Kathleen
asked
in
DS
Sep 15, 2014
by
Kathleen
23.3k
views
gatecse-2002
data-structures
binary-tree
normal
22
votes
7
answers
88
GATE CSE 2001 | Question: 2.16
What is the minimum number of stacks of size $n$ required to implement a queue of size $n$? One Two Three Four
Kathleen
asked
in
DS
Sep 14, 2014
by
Kathleen
24.2k
views
gatecse-2001
data-structures
easy
stack
queue
34
votes
6
answers
89
GATE CSE 2022 | Question: 52
Consider the queues $Q_{1}$ containing four elements and $Q_{2}$ containing none (shown as the $\textsf{Initial State}$ in the figure). The only operations allowed on these two queues are $\textsf{Enqueue (Q, element)}$ ... $\textsf{Final State}$ in the figure) without using any additional storage is________________.
Arjun
asked
in
DS
Feb 15, 2022
by
Arjun
18.3k
views
gatecse-2022
numerical-answers
data-structures
queue
2-marks
5
votes
6
answers
90
NIELIT 2016 MAR Scientist B - Section C: 13
What error would the following function give on compilation? f(int a, int b) { int a; a=20; return a; } Missing parenthesis is $\textit{return}$ statement. Function should be defined as $\text{int f(int a, int b)}$ Redeclaration of $a$. None of these.
admin
asked
in
Programming in C
Mar 31, 2020
by
admin
2.1k
views
nielit2016mar-scientistb
programming-in-c
2
votes
6
answers
91
UGC NET CSE | December 2005 | Part 2 | Question: 11
What is the output of the following $C$-program main() { printf("%d %d %d",size of (3.14f), size of (3.14), size of (3.141)); } 4 4 4 4 8 10 8 4 8 8 8 8
go_editor
asked
in
Programming in C
Mar 27, 2020
by
go_editor
2.1k
views
ugcnetcse-dec2005-paper2
programming-in-c
data-types
2
votes
6
answers
92
UGC NET CSE | January 2017 | Part 2 | Question: 24
If $h$ is chosen from a universal collection of hash functions and is used to hash $n$ keys into a table of size $m$, where $n \leq m$, the expected number of collisions involving a particular key $x$ is less than __________. $1$ $1/n$ $1/m$ $n/m$
go_editor
asked
in
DS
Mar 24, 2020
by
go_editor
1.9k
views
ugcnetjan2017ii
cryptography
hashing
data-structures
28
votes
6
answers
93
GATE CSE 2020 | Question: 47
Consider the array representation of a binary min-heap containing $1023$ elements. The minimum number of comparisons required to find the maximum in the heap is ___________.
Arjun
asked
in
DS
Feb 12, 2020
by
Arjun
14.8k
views
gatecse-2020
numerical-answers
binary-heap
2-marks
6
votes
6
answers
94
ISRO2020-18
Consider a $2$-dimensional array $x$ with $10$ rows and $4$ columns, with each element storing a value equivalent to the product of row number and column number. The array is stored in row-major format. If the first element $x[0][0]$ occupies the memory location ... , which all locations (in decimal) will be holding a value of $10$? $1018,1019$ $1022,1041$ $1013,1014$ $1000,1399$
Satbir
asked
in
Programming in C
Jan 13, 2020
by
Satbir
9.6k
views
isro-2020
programming
array
normal
13
votes
6
answers
95
GATE CSE 2019 | Question: 24
Consider the following C program: #include <stdio.h> int main() { int arr[]={1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 5}, *ip=arr+4; printf(“%d\n”, ip[1]); return 0; } The number that will be displayed on execution of the program is _______
Arjun
asked
in
Programming in C
Feb 7, 2019
by
Arjun
13.4k
views
gatecse-2019
numerical-answers
programming-in-c
programming
array
easy
1-mark
5
votes
6
answers
96
ISRO2018-60
What is the output of tho following program? main(){ int x=2, y=5; if(x<y) return (x=x+y); else printf("z1"); printf("z2"); } $z2$ $z1z2$ Compilation error None of these
Arjun
asked
in
Programming in C
Apr 22, 2018
by
Arjun
9.8k
views
isro2018
programming
output
36
votes
6
answers
97
GATE CSE 2018 | Question: 3
A queue is implemented using a non-circular singly linked list. The queue has a head pointer and a tail pointer, as shown in the figure. Let $n$ denote the number of nodes in the queue. Let 'enqueue' be implemented by inserting a new node at the head, and 'dequeue' ... $\Theta(1), \Theta(n)$ $\Theta(n), \Theta(1)$ $\Theta(n), \Theta(n)$
gatecse
asked
in
DS
Feb 14, 2018
by
gatecse
15.3k
views
gatecse-2018
algorithms
data-structures
queue
normal
linked-list
1-mark
2
votes
6
answers
98
c programming
what is the o/p #include<stdio.h> void main() { int a=5; printf("%d %d %d",a++,++a,--a); } also suggest me notes so i can clear my concept about printf function (For Gate)
Nitesh Choudhary
asked
in
Programming in C
Jun 21, 2017
by
Nitesh Choudhary
1.1k
views
programming-in-c
non-gate
36
votes
6
answers
99
GATE CSE 2017 Set 2 | Question: 37
Consider the C program fragment below which is meant to divide $x$ by $y$ using repeated subtractions. The variables $x$, $y$, $q$ and $r$ are all unsigned int. while (r >= y) { r=r-y; q=q+1; } Which of the following conditions on the variables $x, y, q$ and $r$ ... $(q==0) \ \&\& \ (y>0)$
Arjun
asked
in
Programming in C
Feb 14, 2017
by
Arjun
14.1k
views
gatecse-2017-set2
programming
loop-invariants
5
votes
6
answers
100
column major in 3d array
Consider 3 dimensional Array A[90] [30] [40] stored in linear array in column major order. If the base address starts at 10. The location of A[20] [20] [30] is __________ . [Assume the first element is stored at A[1][1][1] and each element take 1 B].
Pankaj Joshi
asked
in
Programming in C
Jan 26, 2017
by
Pankaj Joshi
15.8k
views
array
programming-in-c
data-structures
Page:
« prev
1
2
3
4
5
6
7
8
9
10
...
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