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
1
vote
7
answers
1
The maximum number of nodes on level i of a binary tree
Level of a node is distance from root to that node. For example, level of root is 1 and levels of left and right children of root is 2. The maximum number of nodes on level i of a binary tree is In the following answers, the operator '^' indicates power a) 2^i-1 b)2^i c)2^i+1 d)2^(i+1/2)
Akanksha Kesarwani
asked
in
DS
Jan 16, 2016
by
Akanksha Kesarwani
91.1k
views
binary-tree
data-structures
1
vote
3
answers
2
Linked List implementation of Queue
Which of the following is true about linked list implementation of queue? (a) In push operation, if new nodes are inserted at the beginning of linked list, then in pop operation, nodes must be removed from end. (b) In push operation, if new nodes are ... (1) TC answer should be (b) But If we are allowed to use doubly linked list then answer should be C only ryt?
Shubhanshu
asked
in
Programming
Jun 10, 2017
by
Shubhanshu
41.6k
views
linked-list
data-structures
queue
0
votes
1
answer
3
Which of the following is not a member of a class ?
A. Static function B. Friend Function C. Const Function D. Virtual function
im.raj
asked
in
Programming
May 6, 2016
by
im.raj
41.6k
views
programming-in-c
programming
152
votes
16
answers
4
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
39.3k
views
gatecse-2016-set2
data-structures
binary-search-tree
normal
numerical-answers
35
votes
4
answers
5
GATE CSE 2009 | Question: 37,ISRO-DEC2017-55
What is the maximum height of any AVL-tree with $7$ nodes? Assume that the height of a tree with a single node is $0$. $2$ $3$ $4$ $5$
Kathleen
asked
in
DS
Sep 22, 2014
by
Kathleen
37.5k
views
gatecse-2009
data-structures
binary-search-tree
normal
isrodec2017
avl-tree
42
votes
7
answers
6
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
34.7k
views
gate1995
data-structures
stack
easy
39
votes
6
answers
7
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$
Kathleen
asked
in
DS
Oct 8, 2014
by
Kathleen
32.9k
views
gate1995
data-structures
binary-tree
normal
38
votes
7
answers
8
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
32.9k
views
gate1997
data-structures
binary-search-tree
normal
157
votes
12
answers
9
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 30, 2014
by
Ishrat Jahan
32.0k
views
gateit-2007
data-structures
binary-search-tree
normal
105
votes
5
answers
10
GATE CSE 2008 | Question: 46
You are given the postorder traversal, $P$, of a binary search tree on the $n$ elements $1, 2, \dots, n$. You have to determine the unique binary search tree that has $P$ as its postorder traversal. What is the time complexity of the most efficient algorithm ... $\Theta(\log n)$ $\Theta(n)$ $\Theta(n\log n)$ None of the above, as the tree cannot be uniquely determined
Kathleen
asked
in
DS
Sep 12, 2014
by
Kathleen
31.0k
views
gatecse-2008
data-structures
binary-search-tree
normal
56
votes
14
answers
11
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
29.8k
views
gatecse-2018
binary-heap
numerical-answers
combinatory
2-marks
73
votes
6
answers
12
GATE CSE 2017 Set 1 | Question: 13
Consider the following C code: #include<stdio.h> int *assignval (int *x, int val) { *x = val; return x; } void main () { int *x = malloc(sizeof(int)); if (NULL == x) return; x = assignval (x,0); ... and not as shown. compiles successfully but execution may result in dangling pointer. compiles successfully but execution may result in memory leak.
Arjun
asked
in
Programming
Feb 14, 2017
by
Arjun
29.4k
views
gatecse-2017-set1
programming-in-c
programming
pointers
44
votes
6
answers
13
GATE CSE 2004 | Question: 3
A single array $A[1 \ldots \text{MAXSIZE}]$ is used to implement two stacks. The two stacks grow from opposite ends of the array. Variables $top1$ and $top2$ $(top1 < top 2)$ point to the location of the topmost element in each of the stacks. If the space is to ... $(top1 = \text{MAXSIZE} / 2)$ or $(top2 = \text{MAXSIZE})$ $top1 = top2 - 1$
Kathleen
asked
in
DS
Sep 19, 2014
by
Kathleen
28.9k
views
gatecse-2004
data-structures
stack
easy
82
votes
6
answers
14
GATE CSE 2016 Set 2 | Question: 15
$N$ items are stored in a sorted doubly linked list. For a delete operation, a pointer is provided to the record to be deleted. For a decrease-key operation, a pointer is provided to the record on which the operation is to be performed. An algorithm performs the following operations ... together? $O(\log^{2} N)$ $O(N)$ $O(N^{2})$ $\Theta\left(N^{2}\log N\right)$
Akash Kanase
asked
in
DS
Feb 12, 2016
by
Akash Kanase
27.4k
views
gatecse-2016-set2
data-structures
linked-list
time-complexity
normal
algorithms
24
votes
4
answers
15
GATE CSE 1996 | Question: 2.14
A binary search tree is generated by inserting in order the following integers: $50, 15, 62, 5, 20, 58, 91, 3, 8, 37, 60, 24$ The number of nodes in the left subtree and right subtree of the root respectively is $(4, 7)$ $(7, 4)$ $(8, 3)$ $(3, 8)$
Kathleen
asked
in
DS
Oct 9, 2014
by
Kathleen
27.2k
views
gate1996
data-structures
binary-search-tree
normal
31
votes
6
answers
16
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}$
Kathleen
asked
in
DS
Oct 4, 2014
by
Kathleen
27.1k
views
gate1994
data-structures
stack
normal
75
votes
8
answers
17
GATE CSE 2006 | Question: 49
An implementation of a queue $Q$, using two stacks $S1$ and $S2$, is given below: void insert (Q, x) { push (S1, x); } void delete (Q) { if (stack-empty(S2)) then if (stack-empty(S1)) then { print( Q is empty ); return; } else while (!(stack-empty(S1))){ x=pop ... and $2m\leq y\leq 2n $ $ 2m\leq x<2n $ and $2m\leq y\leq n+m $ $ 2m\leq x<2n $ and $2m\leq y\leq 2n $
Rucha Shelke
asked
in
DS
Sep 26, 2014
by
Rucha Shelke
26.9k
views
gatecse-2006
data-structures
queue
stack
normal
28
votes
3
answers
18
GATE CSE 2007 | Question: 13
The maximum number of binary trees that can be formed with three unlabeled nodes is: $1$ $5$ $4$ $3$
Kathleen
asked
in
DS
Sep 22, 2014
by
Kathleen
26.9k
views
gatecse-2007
data-structures
binary-tree
normal
47
votes
8
answers
19
GATE CSE 2004 | Question: 36
A circularly linked list is used to represent a Queue. A single variable $p$ is used to access the Queue. To which node should $p$ point such that both the operations $\text{enQueue}$ and $\text{deQueue}$ can be performed in constant time? rear node front node not possible with a single pointer node next to front
Kathleen
asked
in
DS
Sep 19, 2014
by
Kathleen
26.1k
views
gatecse-2004
data-structures
linked-list
normal
67
votes
8
answers
20
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
26.0k
views
gatecse-2003
data-structures
heap
Page:
1
2
3
4
5
6
...
293
next »
Subscribe to GATE CSE 2023 Test Series
Subscribe to GO Classes for GATE CSE 2023
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
GATE CSE 2023 Paper & Analysis - Memory Based
From GATE to Australia
DRDO Previous Year Papers
From Rank 4200 to 64: My Journey to Success in GATE CSE Exam
What are the key things to focus on during the final 10-15 days before the GATE exam to improve performance?
Subjects
All categories
General Aptitude
(2.5k)
Engineering Mathematics
(9.3k)
Digital Logic
(3.3k)
Programming and DS
(5.9k)
Programming
(3.9k)
DS
(1.9k)
Algorithms
(4.6k)
Theory of Computation
(6.7k)
Compiler Design
(2.3k)
Operating System
(5.0k)
Databases
(4.6k)
CO and Architecture
(3.8k)
Computer Networks
(4.6k)
Non GATE
(1.3k)
Others
(2.4k)
Admissions
(649)
Exam Queries
(842)
Tier 1 Placement Questions
(17)
Job Queries
(75)
Projects
(9)
Unknown Category
(853)
Recent Blog Comments
Suppose typing happens at 1 keystroke per second....
The algorithm for graph colouring was to pick...
@Aakash_Bhardwaj all the best bro . For your...
What's the answer for keystroke question
Same,easy to moderate
Network Sites
GO Mechanical
GO Electrical
GO Electronics
GO Civil
CSE Doubts
Aptitude Overflow