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
90
votes
11
answers
21
GATE CSE 2014 Set 1 | Question: 12
Consider a rooted n node binary tree represented using pointers. The best upper bound on the time required to determine the number of subtrees having exactly $4$ nodes is $O(n^a\log^bn)$. Then the value of $a+10b$ is __________.
go_editor
asked
in
DS
Sep 26, 2014
by
go_editor
24.3k
views
gatecse-2014-set1
data-structures
binary-tree
numerical-answers
normal
29
votes
11
answers
22
GATE CSE 1998 | Question: 2.11
A complete $n$-ary tree is one in which every node has $0$ or $n$ sons. If $x$ is the number of internal nodes of a complete $n$-ary tree, the number of leaves in it is given by $x(n-1) +1$ $xn-1$ $xn +1$ $x(n+1)$
Kathleen
asked
in
DS
Sep 25, 2014
by
Kathleen
14.6k
views
gate1998
data-structures
tree
normal
103
votes
11
answers
23
GATE CSE 2004 | Question: 85
A program takes as input a balanced binary search tree with $n$ leaf nodes and computes the value of a function $g(x)$ for each node $x$. If the cost of computing $g(x)$ ... time complexity of the program is? $\Theta (n)$ $\Theta (n \log n)$ $\Theta(n^2)$ $\Theta (n^2\log n)$
Kathleen
asked
in
DS
Sep 18, 2014
by
Kathleen
31.3k
views
gatecse-2004
binary-search-tree
normal
data-structures
33
votes
10
answers
24
GATE CSE 2017 Set 1 | Question: 6
Let $T$ be a binary search tree with $15$ nodes. The minimum and maximum possible heights of $T$ are: Note: The height of a tree with a single node is $0$. $4$ and $15$ respectively. $3$ and $14$ respectively. $4$ and $14$ respectively. $3$ and $15$ respectively.
Arjun
asked
in
DS
Feb 14, 2017
by
Arjun
16.6k
views
gatecse-2017-set1
data-structures
binary-search-tree
easy
73
votes
10
answers
25
GATE CSE 2010 | Question: 53
A hash table of length $10$ uses open addressing with hash function $h(k) = k \: \mod \: 10$, and linear probing. After inserting $6$ ... of the key values using the same hash function and linear probing will result in the hash table shown above? $10$ $20$ $30$ $40$
go_editor
asked
in
DS
Apr 21, 2016
by
go_editor
27.0k
views
data-structures
hashing
normal
gatecse-2010
58
votes
10
answers
26
GATE CSE 2014 Set 3 | Question: 42
Consider the C function given below. Assume that the array $listA$ contains $n (>0)$ elements, sorted in ascending order. int ProcessArray(int *listA, int x, int n) { int i, j, k; i = 0; j = n-1; do { k = (i+j)/2; if ... implementation of binary search. It will always find the maximum element in $listA$. It will return −$1$ even when $x$ is present in $listA$.
go_editor
asked
in
DS
Sep 28, 2014
by
go_editor
13.4k
views
gatecse-2014-set3
data-structures
array
easy
79
votes
10
answers
27
GATE CSE 2003 | Question: 23
In a min-heap with $n$ elements with the smallest element at the root, the $7^{th}$ smallest element can be found in time $\Theta (n \log n)$ $\Theta (n)$ $\Theta(\log n)$ $\Theta(1)$
Disha
asked
in
DS
Sep 19, 2014
by
Disha
31.9k
views
gatecse-2003
data-structures
binary-heap
36
votes
9
answers
28
GATE CSE 2020 | Question: 16
What is the worst case time complexity of inserting $n$ elements into an empty linked list, if the linked list needs to be maintained in sorted order? $\Theta(n)$ $\Theta(n \log n)$ $\Theta ( n)^{2}$ $\Theta(1)$
Arjun
asked
in
DS
Feb 12, 2020
by
Arjun
26.3k
views
gatecse-2020
linked-list
1-mark
59
votes
9
answers
29
GATE CSE 2019 | Question: 27
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$
Arjun
asked
in
Programming in C
Feb 7, 2019
by
Arjun
27.1k
views
gatecse-2019
programming-in-c
programming
2-marks
71
votes
9
answers
30
GATE CSE 2019 | Question: 46
Let $T$ be a full binary tree with $8$ leaves. (A full binary tree has every level full.) Suppose two leaves $a$ and $b$ of $T$ are chosen uniformly and independently at random. The expected value of the distance between $a$ and $b$ in $T$ (ie., the number of edges in the unique path between $a$ and $b$) is (rounded off to $2$ decimal places) _________.
Arjun
asked
in
DS
Feb 7, 2019
by
Arjun
30.6k
views
gatecse-2019
numerical-answers
data-structures
binary-tree
2-marks
7
votes
9
answers
31
AVL tree
The number of different orders are possible for elements 1, 2, 3, 4, 5, 6, 7 to be inserted in to empty AVL tree such that no rotation will be done and element ‘4’ is root are ________.
syncronizing
asked
in
DS
Sep 15, 2018
by
syncronizing
8.9k
views
data-structures
avl-tree
numerical-answers
42
votes
9
answers
32
GATE CSE 2018 | Question: 2
Consider the following C program: #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; } The output of this program is: 0, c 0, a+2 '0', 'a+2' '0', 'c'
gatecse
asked
in
Programming in C
Feb 14, 2018
by
gatecse
20.3k
views
gatecse-2018
programming-in-c
programming
structure
normal
1-mark
101
votes
9
answers
33
GATE CSE 2017 Set 1 | Question: 53
Consider the following C program. #include<stdio.h> #include<string.h> void printlength(char *s, char *t) { unsigned int c=0; int len = ((strlen(s) - strlen(t)) > c) ? strlen(s) : strlen(t); printf("%d\n", len); } ... in $string.h$ as returning a value of type $size\_t$, which is an unsigned int. The output of the program is __________ .
srestha
asked
in
Programming in C
Feb 14, 2017
by
srestha
24.9k
views
gatecse-2017-set1
programming
programming-in-c
normal
numerical-answers
7
votes
9
answers
34
ISRO2014-3
What is the output of the following C program? #include<stdio.h> #define SQR(x) (x*x) int main() { int a; int b=4; a=SQR(b+2); printf("%d\n",a); return 0; } 14 36 18 20
pooja14
asked
in
Programming in C
Jun 22, 2016
by
pooja14
8.1k
views
programming-in-c
macros
isro2014
65
votes
9
answers
35
GATE CSE 2016 Set 1 | Question: 38
Consider the weighted undirected graph with $4$ vertices, where the weight of edge $\{i,j\}$ is given by the entry $W_{ij}$ in the matrix $W$ ... integer value of $x$, for which at least one shortest path between some pair of vertices will contain the edge with weight $x$ is ___________.
Sandeep Singh
asked
in
DS
Feb 12, 2016
by
Sandeep Singh
23.9k
views
gatecse-2016-set1
data-structures
graph-theory
normal
numerical-answers
9
votes
9
answers
36
ISRO2014-73
How many different trees are there with four nodes $\text{A, B, C}$ and $\text{D}?$ $30$ $60$ $90$ $120$
ajit
asked
in
DS
Sep 23, 2015
by
ajit
14.6k
views
isro2014
data-structures
tree
combinatory
43
votes
9
answers
37
GATE CSE 1998 | Question: 19b
Compute the post fix equivalent of the following expression $3^*\log(x+1)-\frac{a}{2}$
Arjun
asked
in
DS
Aug 29, 2015
by
Arjun
15.6k
views
gate1998
stack
infix-prefix
descriptive
71
votes
9
answers
38
GATE CSE 2015 Set 2 | Question: 31
A Young tableau is a $2D$ array of integers increasing from left to right and from top to bottom. Any unfilled entries are marked with $\infty$, and hence there cannot be any entry to the right of, or below a $\infty$. The following Young tableau ... The minimum number of entries (other than $1$) to be shifted, to remove $1$ from the given Young tableau is _____.
go_editor
asked
in
DS
Feb 12, 2015
by
go_editor
13.1k
views
gatecse-2015-set2
databases
array
normal
numerical-answers
65
votes
9
answers
39
GATE IT 2004 | Question: 13
Let $P$ be a singly linked list. Let $Q$ be the pointer to an intermediate node $x$ in the list. What is the worst-case time complexity of the best-known algorithm to delete the node $x$ from the list ? $O(n)$ $O(\log^2 n)$ $O(\log n)$ $O(1)$
Ishrat Jahan
asked
in
DS
Nov 1, 2014
by
Ishrat Jahan
24.8k
views
gateit-2004
data-structures
linked-list
normal
ambiguous
48
votes
9
answers
40
GATE CSE 2011 | Question: 29
We are given a set of $n$ distinct elements and an unlabeled binary tree with $n$ nodes. In how many ways can we populate the tree with the given set so that it becomes a binary search tree? $0$ $1$ $n!$ $\frac{1} {n+1} .^{2n}C_n$
go_editor
asked
in
DS
Sep 29, 2014
by
go_editor
31.6k
views
gatecse-2011
binary-tree
normal
Page:
« prev
1
2
3
4
5
6
7
...
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