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
Recent questions tagged data-structures
35
votes
4
answers
1531
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
36.5k
views
gatecse-2009
data-structures
binary-search-tree
normal
isrodec2017
avl-tree
27
votes
2
answers
1532
GATE CSE 2009 | Question: 36
The keys $12, 18, 13, 2, 3, 23, 5$ and $15$ are inserted into an initially empty hash table of length $10$ using open addressing with hash function $h(k) = k \mod 10$ ...
Kathleen
asked
in
DS
Sep 22, 2014
by
Kathleen
5.4k
views
gatecse-2009
data-structures
hashing
normal
57
votes
5
answers
1533
GATE CSE 2007 | Question: 47
Consider the process of inserting an element into a $Max \: Heap$, where the $Max \: Heap$ is represented by an $array$. Suppose we perform a binary search on the path from the new leaf to the root to find the position for the newly inserted element, the number of $comparisons$ performed is: $\Theta(\log_2n)$ $\Theta(\log_2\log_2n)$ $\Theta(n)$ $\Theta(n\log_2n)$
Kathleen
asked
in
DS
Sep 22, 2014
by
Kathleen
14.1k
views
gatecse-2007
data-structures
heap
normal
27
votes
4
answers
1534
GATE CSE 2007 | Question: 46
Consider the following C program segment where $CellNode$ represents a node in a binary tree: struct CellNode { struct CellNode *leftChild; int element; struct CellNode *rightChild; }; int Getvalue (struct CellNode *ptr) { int value = 0; if (ptr != NULL) ... in the tree the number of internal nodes in the tree the number of leaf nodes in the tree the height of the tree
Kathleen
asked
in
DS
Sep 22, 2014
by
Kathleen
6.4k
views
gatecse-2007
data-structures
binary-tree
normal
29
votes
8
answers
1535
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 22, 2014
by
Kathleen
22.3k
views
gatecse-2007
data-structures
tree
normal
24
votes
2
answers
1536
GATE CSE 2007 | Question: 40
Consider a hash table of size seven, with starting index zero, and a hash function $(3x + 4)\mod 7$. Assuming the hash table is initially empty, which of the following is the contents of the table when the sequence $1, 3, 8, 10$ is inserted into the table using closed hashing? Note that − denotes an ... $3$ $1$, −, −, −, −, −, $3$ $1, 10, 8$, −, −, −,$ 3$
Kathleen
asked
in
DS
Sep 22, 2014
by
Kathleen
13.2k
views
gatecse-2007
data-structures
hashing
easy
18
votes
3
answers
1537
GATE CSE 2007 | Question: 39, UGCNET-June2015-II: 22
The inorder and preorder traversal of a binary tree are $\text{d b e a f c g}$ and $\text{a b d e c f g}$, respectively The postorder traversal of the binary tree is: $\text{d e b f g c a}$ $\text{e d b g f c a}$ $\text{e d b f g c a}$ $\text{d e f g b c a}$
Kathleen
asked
in
DS
Sep 22, 2014
by
Kathleen
6.6k
views
gatecse-2007
data-structures
binary-tree
normal
ugcnetcse-june2015-paper2
34
votes
4
answers
1538
GATE CSE 2007 | Question: 38, ISRO2016-27
The following postfix expression with single digit operands is evaluated using a stack: $8 \ 2 \ 3 \ {}^\hat{} ∕ \ 2 \ 3 * + 5 \ 1 * -$ Note that $^\hat{}$ is the exponentiation operator. The top two elements of the stack after the first $*$ is evaluated are $6, 1$ $5, 7$ $3, 2$ $1, 5$
Kathleen
asked
in
DS
Sep 22, 2014
by
Kathleen
13.9k
views
gatecse-2007
data-structures
stack
normal
isro2016
28
votes
3
answers
1539
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.2k
views
gatecse-2007
data-structures
binary-tree
normal
24
votes
4
answers
1540
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 22, 2014
by
Kathleen
21.9k
views
gatecse-2007
data-structures
binary-tree
easy
65
votes
8
answers
1541
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
25.2k
views
gatecse-2003
data-structures
heap
84
votes
11
answers
1542
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 19, 2014
by
Kathleen
21.2k
views
gatecse-2004
binary-search-tree
normal
data-structures
37
votes
3
answers
1543
GATE CSE 2004 | Question: 43
Consider the following C program segment struct CellNode{ struct CellNode *leftChild int element; struct CellNode *rightChild; }; int Dosomething (struct CellNode *ptr) { int value = 0; if(ptr != NULL) { if (ptr -> leftChild != NULL) value = 1 + ... leaf nodes in the tree The number of nodes in the tree The number of internal nodes in the tree The height of the tree
Kathleen
asked
in
DS
Sep 19, 2014
by
Kathleen
5.7k
views
gatecse-2004
data-structures
binary-tree
normal
54
votes
4
answers
1544
GATE CSE 2004 | Question: 40
Suppose each set is represented as a linked list with elements in arbitrary order. Which of the operations among $\text{union, intersection, membership, cardinality}$ will be the slowest? $\text{union}$ only $\text{intersection, membership}$ $\text{membership, cardinality}$ $\text{union, intersection}$
Kathleen
asked
in
DS
Sep 19, 2014
by
Kathleen
15.0k
views
gatecse-2004
data-structures
linked-list
normal
24
votes
3
answers
1545
GATE CSE 2004 | Question: 37
The elements $32, 15, 20, 30, 12, 25, 16,$ are inserted one by one in the given order into a maxHeap. The resultant maxHeap is
Kathleen
asked
in
DS
Sep 19, 2014
by
Kathleen
4.2k
views
gatecse-2004
data-structures
heap
normal
44
votes
8
answers
1546
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
25.1k
views
gatecse-2004
data-structures
linked-list
normal
24
votes
3
answers
1547
GATE CSE 2004 | Question: 35
Consider the label sequences obtained by the following pairs of traversals on a labeled binary tree. Which of these pairs identify a tree uniquely? preorder and postorder inorder and postorder preorder and inorder level order and postorder I only II, III III only IV only
Kathleen
asked
in
DS
Sep 19, 2014
by
Kathleen
6.6k
views
gatecse-2004
data-structures
binary-tree
normal
19
votes
4
answers
1548
GATE CSE 2004 | Question: 7
Given the following input $(4322, 1334, 1471, 9679, 1989, 6171, 6173, 4199)$ and the hash function $x$ mod $10$, which of the following statements are true? $9679, 1989, 4199$ hash to the same value $1471, 6171$ hash to the same value All elements hash to the same value Each element hashes to a different value I only II only I and II only III or IV
Kathleen
asked
in
DS
Sep 19, 2014
by
Kathleen
7.6k
views
gatecse-2004
data-structures
hashing
easy
18
votes
3
answers
1549
GATE CSE 2004 | Question: 6
Level order traversal of a rooted tree can be done by starting from the root and performing preorder traversal in-order traversal depth first search breadth first search
Kathleen
asked
in
DS
Sep 19, 2014
by
Kathleen
4.6k
views
gatecse-2004
data-structures
tree
easy
19
votes
4
answers
1550
GATE CSE 2004 | Question: 5
The best data structure to check whether an arithmetic expression has balanced parentheses is a queue stack tree list
Kathleen
asked
in
DS
Sep 19, 2014
by
Kathleen
5.5k
views
gatecse-2004
data-structures
easy
stack
24
votes
5
answers
1551
GATE CSE 2004 | Question: 4, ISRO2009-26
The following numbers are inserted into an empty binary search tree in the given order: $10, 1, 3, 5, 15, 12, 16$. What is the height of the binary search tree (the height is the maximum distance of a leaf node from the root)? $2$ $3$ $4$ $6$
Kathleen
asked
in
DS
Sep 19, 2014
by
Kathleen
19.2k
views
gatecse-2004
data-structures
binary-search-tree
easy
isro2009
44
votes
6
answers
1552
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
27.7k
views
gatecse-2004
data-structures
stack
easy
58
votes
4
answers
1553
GATE CSE 2006 | Question: 13
A scheme for storing binary trees in an array $X$ is as follows. Indexing of $X$ starts at $1$ instead of $0$. the root is stored at $X[1]$. For a node stored at $X[i]$, the left child, if any, is stored in $X[2i]$ and the right child, if any, in $X[2i+1]$. To be able to store any binary tree on n vertices the minimum size of $X$ should be $\log_2 n$ $n$ $2n+1$ $2^n-1$
Rucha Shelke
asked
in
DS
Sep 17, 2014
by
Rucha Shelke
12.0k
views
gatecse-2006
data-structures
binary-tree
normal
50
votes
4
answers
1554
GATE CSE 2003 | Question: 90
Consider the function $f$ defined below. struct item { int data; struct item * next; }; int f(struct item *p) { return ((p == NULL) || (p->next == NULL)|| ((p->data <= p ->next -> data) && f(p- ... order of data value the elements in the list are sorted in non-increasing order of data value not all elements in the list have the same data value
Kathleen
asked
in
DS
Sep 17, 2014
by
Kathleen
11.8k
views
gatecse-2003
data-structures
linked-list
normal
75
votes
12
answers
1555
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
21.5k
views
gatecse-2003
data-structures
stack
normal
56
votes
4
answers
1556
GATE CSE 2003 | Question: 63, ISRO2009-25
A data structure is required for storing a set of integers such that each of the following operations can be done in $O(\log n)$ time, where $n$ is the number of elements in the set. Deletion of the smallest element Insertion of an ... used but not a heap Both balanced binary search tree and heap can be used Neither balanced search tree nor heap can be used
Kathleen
asked
in
DS
Sep 17, 2014
by
Kathleen
15.9k
views
gatecse-2003
data-structures
easy
isro2009
binary-search-tree
38
votes
5
answers
1557
GATE CSE 2006 | Question: 10
In a binary max heap containing $n$ numbers, the smallest element can be found in time $O(n)$ $O(\log n)$ $O(\log \log n)$ $O(1)$
Rucha Shelke
asked
in
DS
Sep 16, 2014
by
Rucha Shelke
17.4k
views
gatecse-2006
data-structures
heap
easy
18
votes
1
answer
1558
GATE CSE 2002 | Question: 6
Draw all binary trees having exactly three nodes labeled $A, B$ and $C$ on which preorder traversal gives the sequence $C, B, A$.
Kathleen
asked
in
DS
Sep 16, 2014
by
Kathleen
1.8k
views
gatecse-2002
data-structures
binary-tree
easy
descriptive
83
votes
6
answers
1559
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 16, 2014
by
Kathleen
18.0k
views
gatecse-2002
data-structures
binary-tree
normal
31
votes
4
answers
1560
GATE CSE 2002 | Question: 2.9
The number of leaf nodes in a rooted tree of n nodes, with each node having $0$ or $3$ children is: $\frac{n}{2}$ $\frac{(n-1)}{3}$ $\frac{(n-1)}{2}$ $\frac{(2n+1)}{3}$
Kathleen
asked
in
DS
Sep 16, 2014
by
Kathleen
25.0k
views
gatecse-2002
data-structures
tree
normal
Page:
« prev
1
...
47
48
49
50
51
52
53
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
Life happens, just chill and do hardwork
ISRO RECRUITMENT FOR SCIENTIST B THROUGH GATE
POWER GRID CORPORATION OF INDIA LIMITED
INSTITUTE OF BANKING PERSONNEL SELECTION
GATE Overflow books for TIFR, ISRO, UGCNET and NIELIT
Subjects
All categories
General Aptitude
(2.4k)
Engineering Mathematics
(9.1k)
Digital Logic
(3.2k)
Programming and DS
(5.8k)
Algorithms
(4.5k)
Theory of Computation
(6.6k)
Compiler Design
(2.3k)
Operating System
(4.9k)
Databases
(4.5k)
CO and Architecture
(3.7k)
Computer Networks
(4.5k)
Non GATE
(1.3k)
Others
(2.4k)
Admissions
(648)
Exam Queries
(841)
Tier 1 Placement Questions
(17)
Job Queries
(74)
Projects
(9)
Unknown Category
(854)
Recent questions tagged data-structures
Recent Blog Comments
Please upload 4th Mock Test, due date was 4th Dec.
The counts of answered, marked etc in the exam...
Tests have been sent and all tests will be...
Maximum age limit changed from 35 yrs. to 28...
Hmm, sir totally getting your point ☺️☺️....