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 viewed questions in Programming and DS
73
votes
10
answers
41
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
100
votes
6
answers
42
GATE IT 2006 | Question: 49
Which one of the choices given below would be printed when the following program is executed ? #include <stdio.h> struct test { int i; char *c; }st[] = {5, "become", 4, "better", 6, "jungle", 8, "ancestor", 7, " ... $\text{etter, u, 6, ungle}$ $\text{cetter, k, 6, jungle}$ $\text{etter, u, 8, ncestor}$
Ishrat Jahan
asked
in
Programming in C
Oct 31, 2014
by
Ishrat Jahan
27.0k
views
gateit-2006
programming
programming-in-c
normal
structure
36
votes
9
answers
43
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
57
votes
11
answers
44
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
31
votes
8
answers
45
GATE CSE 2007 | Question: 43
A complete $n-ary$ tree is a tree in which each node has $n$ children or no children. Let $I$ be the number of internal nodes and $L$ be the number of leaves in a complete $n-ary$ tree. If $L = 41$ and $I = 10$, what is the value of $n$? $3$ $4$ $5$ $6$
Kathleen
asked
in
DS
Sep 21, 2014
by
Kathleen
25.8k
views
gatecse-2007
data-structures
tree
normal
73
votes
5
answers
46
GATE CSE 2016 Set 2 | Question: 34
A complete binary min-heap is made by including each integer in $[1, 1023]$ exactly once. The depth of a node in the heap is the length of the path from the root of the heap to that node. Thus, the root is at depth $0$. The maximum depth at which integer $9$ can appear is _________.
Akash Kanase
asked
in
DS
Feb 12, 2016
by
Akash Kanase
25.8k
views
gatecse-2016-set2
data-structures
binary-heap
normal
numerical-answers
26
votes
4
answers
47
GATE CSE 2007 | Question: 12
The height of a binary tree is the maximum number of edges in any root to leaf path. The maximum number of nodes in a binary tree of height $h$ is: $2^h -1$ $2^{h-1} -1$ $2^{h+1} -1$ $2^{h+1}$
Kathleen
asked
in
DS
Sep 21, 2014
by
Kathleen
25.7k
views
gatecse-2007
data-structures
binary-tree
easy
85
votes
11
answers
48
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
84
votes
6
answers
49
GATE IT 2006 | Question: 50
Which one of the choices given below would be printed when the following program is executed? #include <stdio.h> void swap (int *x, int *y) { static int *temp; temp = x; x = y; y = temp; } void printab () { static int i, a = -3, b = -6; i = 0; while (i <= 4) { if ((i++)%2 == 1 ... $a = 12, b = 9$ $a = 3, b = 6$ $a = 3, b = 6$ $a = 6, b = 3$ $a = 15, b = 12$
Ishrat Jahan
asked
in
Programming in C
Oct 31, 2014
by
Ishrat Jahan
25.5k
views
gateit-2006
programming
programming-in-c
normal
parameter-passing
37
votes
3
answers
50
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.
Kathleen
asked
in
Programming in C
Oct 5, 2014
by
Kathleen
25.5k
views
gate1994
programming
recursion
normal
descriptive
103
votes
7
answers
51
GATE CSE 2017 Set 1 | Question: 36
Consider the C functions foo and bar given below: int foo(int val) { int x=0; while(val > 0) { x = x + foo(val--); } return val; } int bar(int val) { int x = 0; while(val > 0) { x ... in: Return of $6$ and $6$ respectively. Infinite loop and abnormal termination respectively. Abnormal termination and infinite loop respectively. Both terminating abnormally.
Arjun
asked
in
Programming in C
Feb 14, 2017
by
Arjun
25.2k
views
gatecse-2017-set1
programming-in-c
programming
normal
recursion
1
vote
1
answer
52
self doubt
Which one of the following is an application of Queue Data Structure? A When a resource is shared among multiple consumers. B When data is transferred asynchronously (data not necessarily received at same rate as sent) between two processes C Load Balancing D all above
chandra sai
asked
in
DS
Nov 6, 2017
by
chandra sai
25.2k
views
0
votes
1
answer
53
Linked list insertion
In a linked list with $n$ nodes, the time taken to insert an element after an element pointed by some pointer is: $(A) O(1)$ $(B) O(logn)$ $(C) O(n)$ $(D) O(nlogn)$
Lakshman Bhaiya
asked
in
DS
Oct 17, 2018
by
Lakshman Bhaiya
25.2k
views
data-structures
linked-list
101
votes
9
answers
54
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.8k
views
gatecse-2017-set1
programming
programming-in-c
normal
numerical-answers
65
votes
9
answers
55
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.7k
views
gateit-2004
data-structures
linked-list
normal
ambiguous
54
votes
9
answers
56
GATE CSE 2014 Set 2 | Question: 41
Suppose a stack implementation supports an instruction $\text{REVERSE}$, which reverses the order of elements on the stack, in addition to the $\text{PUSH}$ and $\text{POP}$ ... instruction. A queue can be implemented where both $\text{ENQUEUE}$ and $\text{DEQUEUE}$ take a single instruction each.
go_editor
asked
in
DS
Sep 28, 2014
by
go_editor
24.7k
views
gatecse-2014-set2
data-structures
stack
easy
56
votes
5
answers
57
GATE CSE 1997 | Question: 4.7
A priority queue $Q$ is used to implement a stack that stores characters. PUSH (C) is implemented as INSERT $(Q, C, K)$ where $K$ is an appropriate integer key chosen by the implementation. POP is implemented as ... For a sequence of operations, the keys chosen are in non-increasing order non-decreasing order strictly increasing order strictly decreasing order
Kathleen
asked
in
DS
Sep 29, 2014
by
Kathleen
24.3k
views
gate1997
data-structures
stack
normal
priority-queue
90
votes
11
answers
58
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
31
votes
4
answers
59
GATE CSE 2005 | Question: 35
How many distinct binary search trees can be created out of $4$ distinct keys? $5$ $14$ $24$ $42$
Kathleen
asked
in
DS
Sep 22, 2014
by
Kathleen
24.3k
views
gatecse-2005
data-structures
binary-search-tree
counting
normal
22
votes
7
answers
60
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
Page:
« prev
1
2
3
4
5
6
7
8
...
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