The Gateway to Computer Science Excellence
For all GATE CSE Questions
Toggle navigation
GATE Overflow
Facebook Login
Google Login
or
Email or Username
Password
Remember
Login
Register

I forgot my password
All Activity
Questions
Unanswered
Tags
Subjects
Users
Ask
Lists
Previous
Blogs
New Blog
Exams
First time here? Checkout the
FAQ
!
x
×
Close
Use the google search bar on side panel. It searches through all previous GATE/other questions. For hardcopy of previous year questions please see
here
Recent questions and answers in DS
0
votes
1
answer
1
Topological Sort
How many Topological Orderings possible?
answered
14 hours
ago
in
DS
by
Rustam Ali
Junior
(
795
points)

23
views
datastructure
topologicalsort
nooftopologicalordering
+21
votes
4
answers
2
GATE2015317
Given that hash table $T$ with $25$ slots that stores $2000$ elements, the load factor $a$ for $T$ is _________.
answered
15 hours
ago
in
DS
by
rohittulasyan
(
111
points)

1.3k
views
gate20153
datastructure
hashing
normal
numericalanswers
+20
votes
3
answers
3
GATE2014140
Consider a hash table with $9$ slots. The hash function is $h(k)= k \mod 9$. The collisions are resolved by chaining. The following $9$ keys are inserted in the order: $5, 28, 19, 15, 20, 33, 12, 17, 10$. The maximum, minimum, and average chain lengths in the hash table, respectively, are $3, 0,$ and $1$ $3, 3,$ and $3$ $4, 0,$ and $1$ $3, 0,$ and $2$
answered
15 hours
ago
in
DS
by
rohittulasyan
(
111
points)

1.5k
views
gate20141
datastructure
hashing
normal
0
votes
2
answers
4
UGCNETJune2010II4
$S_{1}$ : I teach algorithms and maths. $S_{2}$ : My professor teaches maths, electronics and computer science. $S_{3}$ : I have a student of maths. $S_{4}$ : Algorithm is a part of computer science. $S_{5}$ : Maths students know ... associations/relationships amongst the entities/actors as expressed in the sentences $S_{1}$ to $S_{5}$ above ? $2$ $3$ $4$ None of these
answered
17 hours
ago
in
DS
by
Gurdeep Saini
Junior
(
825
points)

121
views
ugcnetjune2010ii
datastructure
graphs
0
votes
1
answer
5
Doubt
can anyone explain in detail why and how is merge sort optimal for linked list?
answered
17 hours
ago
in
DS
by
gate_dreams
(
27
points)

29
views
linked
linkedlists
merge
mergesort
0
votes
1
answer
6
minimum spanning is a spanning tree in which removal of any edges disconnnects the tree. True or false?
answered
19 hours
ago
in
DS
by
gate_dreams
(
27
points)

16
views
0
votes
1
answer
7
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)$
answered
1 day
ago
in
DS
by
Somoshree Datta 5
Active
(
2.2k
points)

33
views
datastructure
linkedlists
+1
vote
0
answers
8
Linked list
If the head of a Linked List is pointing to $k$ th element, then how will you get the elements before $k$ th element?
asked
1 day
ago
in
DS
by
Lakshman Patel RJIT
Loyal
(
9.6k
points)

29
views
datastructure
linkedlists
0
votes
0
answers
9
Linked List Data Structures And Algorithms Made Easy By Narasimha Karumanchi
asked
1 day
ago
in
DS
by
Lakshman Patel RJIT
Loyal
(
9.6k
points)

24
views
datastructure
linkedlists
+31
votes
5
answers
10
GATE200842
$G$ is a graph on $n$ vertices and $2n2$ edges. The edges of $G$ can be partitioned into two edgedisjoint spanning trees. Which of the following is NOT true for $G$? For every subset of $k$ vertices, the induced subgraph has at most $2k2$ ... at least $2$ edgedisjoint paths between every pair of vertices. There are at least $2$ vertexdisjoint paths between every pair of vertices.
answered
1 day
ago
in
DS
by
Ayush Upadhyaya
Boss
(
13.9k
points)

5k
views
gate2008
datastructure
graphs
normal
0
votes
0
answers
11
Binary tree
No. Of unlabeled binary tree possible with n nodes
asked
2 days
ago
in
DS
by
Risi
(
11
points)

16
views
0
votes
0
answers
12
Number of Topological Order
Find the number of Topological order(sort) in the given graph? $(1)$ $(2)$
asked
2 days
ago
in
DS
by
Lakshman Patel RJIT
Loyal
(
9.6k
points)

27
views
datastructure
nooftopologicalordering
+26
votes
4
answers
13
GATE2014341
Consider the pseudocode given below. The function $DoSomething()$ takes as argument a pointer to the root of an arbitrary tree represented by the $leftMostChildrightSibling$ representation. Each node of the tree is of type $treeNode$. typedef struct treeNode* treeptr; struct ... height of the tree. number of nodes without a right sibling in the tree. number of leaf nodes in the tree
answered
6 days
ago
in
DS
by
Abhisek Tiwari 4
Junior
(
925
points)

3.5k
views
gate20143
datastructure
trees
normal
0
votes
1
answer
14
Expression Tree Evaluation
While evaluating the expression tree, if the left or right child is not present then the value of that particular missing child is taken as 0? Have a look at this question In my evaluation, I am getting: ( (a0)  b )  0 + e! = ab+e! Answer is given as option c but by this approach, I am getting option (d) as the answer.
answered
6 days
ago
in
DS
by
Mohit Pandit
(
17
points)

36
views
expressionevaluation
datastructure
+14
votes
6
answers
15
GATE20021.5
In the worst case, the number of comparisons needed to search a single linked list of length $n$ for a given element is $\log n$ $\frac{n}{2}$ $\log_2 {n}  1$ $n$
answered
Oct 11
in
DS
by
rohittulasyan
(
111
points)

1.7k
views
gate2002
easy
datastructure
linkedlists
+11
votes
3
answers
16
GATE200740
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 ... $10$ $1, 8, 10$, âˆ’, âˆ’, âˆ’, $3$ $1$, âˆ’, âˆ’, âˆ’, âˆ’, âˆ’, $3$ $1, 10, 8$, âˆ’, âˆ’, âˆ’,$ 3$
answered
Oct 11
in
DS
by
rohittulasyan
(
111
points)

1.7k
views
gate2007
datastructure
hashing
easy
+11
votes
3
answers
17
GATE2005IT16
A hash table contains $10$ buckets and uses linear probing to resolve collisions. The key values are integers and the hash function used is key % $10$. If the values $43, 165, 62, 123, 142$ are inserted in the table, in what location would the key value $142$ be inserted? $2$ $3$ $4$ $6$
answered
Oct 11
in
DS
by
rohittulasyan
(
111
points)

1.8k
views
gate2005it
datastructure
hashing
easy
+11
votes
4
answers
18
GATE20047
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
answered
Oct 11
in
DS
by
rohittulasyan
(
111
points)

881
views
gate2004
datastructure
hashing
easy
+14
votes
6
answers
19
GATE2015313
While inserting the elements $71, 65, 84, 69, 67, 83$ in an empty binary search tree (BST) in the sequence shown, the element in the lowest level is $65$ $67$ $69$ $83$
answered
Oct 11
in
DS
by
rohittulasyan
(
111
points)

1.1k
views
gate20153
datastructure
binarysearchtree
easy
+15
votes
4
answers
20
GATE19962.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)$
answered
Oct 11
in
DS
by
rohittulasyan
(
111
points)

1.5k
views
gate1996
datastructure
binarysearchtree
normal
+20
votes
6
answers
21
GATE19951.17
A binary tree $T$ has $n$ leaf nodes. The number of nodes of degree $2$ in $T$ is $\log_2 n$ $n1$ $n$ $2^n$
answered
Oct 11
in
DS
by
rohittulasyan
(
111
points)

3.7k
views
gate1995
datastructure
binarytree
normal
0
votes
1
answer
22
nptel lecture on stacks
While calculating the cost of growable arraybased stack.... the cost of n pushes came out as a series  2 + 4 + 8 + 16 +......+2^(logn + 1) and it equals to 4n  1. I didn't understand how the series sum equals to 4n?
answered
Oct 9
in
DS
by
Utkarsh Joshi
Active
(
2.2k
points)

25
views
datastructure
stack
0
votes
0
answers
23
self doubt test series question
here answer given is b but suppose i have 3 elements 7,8,9 i.e no zero is present while executing this program a condition is coming where i is incremented to 3 and again we need to check the condition but how to check becz array[3] is not there or say we have only 3 elements.....then what to do
asked
Oct 7
in
DS
by
eyeamgj
Active
(
5.1k
points)

30
views
0
votes
0
answers
24
MADEASY TESTSERIES DS
IN THE VIA HEAP LIST WHY IT IS O(LOGN) FOR SEARCHING??
asked
Oct 7
in
DS
by
eyeamgj
Active
(
5.1k
points)

53
views
+2
votes
1
answer
25
general doubt on breadth first search
While doing BFS , at any time in queue suppose there are r vertices v1,v2,v3.....vr with v.d as the distance from the source. Then according to me at any time in a queue, v1.d=v2.d or v2.d=v1.d+1 But in cormen its written that v2.d<=v1.d+1 Can someone please explain?
answered
Oct 4
in
DS
by
daksirp
Active
(
1.4k
points)

54
views
bfs
datastructure
graphalgorithms
0
votes
1
answer
26
Gateforum
answered
Oct 2
in
DS
by
Dharmendra Lodhi
Active
(
2.3k
points)

36
views
0
votes
0
answers
27
Made easy,graphs
let G be an undirected graph. consider a depthfirst traversal of G, and let T be the resulting depthfirst search tree. let you be a vertex in G and let V be the first new (unvisited) vortex visited after visiting you in the traversal. which of the following statement is always true?
asked
Oct 1
in
DS
by
KrishY
(
7
points)

39
views
graphtheory
0
votes
1
answer
28
bookk
What will be the output of the following program? Assume that you are running this program in littleending processor. #include<stdio.h> int main() { short a=320; char *ptr; ptr=(char *)&a; printf("%d",*ptr); return 0; }
answered
Sep 30
in
DS
by
Sakshi Jaiswal
(
181
points)

40
views
programminginc
+31
votes
4
answers
29
GATE2016110
A queue is implemented using an array such that ENQUEUE and DEQUEUE operations are performed efficiently. Which one of the following statements is CORRECT ($n$ refers to the number of items in the queue) ? Both operations can be performed in $O(1)$ time. At most one ... for both operations will be $\Omega (n)$. Worst case time complexity for both operations will be $\Omega (\log n)$
answered
Sep 30
in
DS
by
vupadhayayx86
Junior
(
529
points)

4.8k
views
gate20161
datastructure
queues
normal
+2
votes
1
answer
30
Data Structure
Is it possible to construct multiple binary from given preorder and postorder?
answered
Sep 27
in
DS
by
Prince Sindhiya
Active
(
3.6k
points)

34
views
–1
vote
0
answers
31
DFS (explain)
asked
Sep 24
in
DS
by
balaganesh
(
125
points)

18
views
dfs
0
votes
0
answers
32
AVL Rotation
please suggest me some good tutorials for AVL tree rotation.
asked
Sep 24
in
DS
by
MRINMOY_HALDER
(
167
points)

13
views
selfstudy
+3
votes
3
answers
33
Hashing : Quadratic Probing
Keys $9,19,29,39,49,59,69$ are inserted into a hash Table of size $10$ $(09)$ using the hash function $H = k mod 10$ and Quadratic Probing is used for collision resolution. What is the index into which 59 will be inserted ? $a). 3$ $b). 6$ $c). 8$ $d). 5$
answered
Sep 23
in
DS
by
Raghava45
(
205
points)

967
views
hashing
datastructure
+27
votes
7
answers
34
GATE201129
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$
answered
Sep 22
in
DS
by
Sangeeth680
(
19
points)

4.6k
views
gate2011
binarytree
normal
0
votes
1
answer
35
conceptual doubt
WHAT IS THE TIME COMPLEXITY TO ENQUEUE AN ELEMENT IF THE QUEUE IS IMPLEMENTED AS A CIRCULAR QUEUE AND WE HAVE GOT ONLY ONE POINTER TO FRONT ELEMENT??
answered
Sep 20
in
DS
by
phaneendrababu
(
143
points)

84
views
datastructure
linkedlists
timecomplexity
queues
0
votes
0
answers
36
self doubt
https://gateoverflow.in/3654/gate2004it13 there can be following assumption for this question?? 1)x is data and q pointing the node having data x so in this case O(1) is fine.?? 2)x is address(location) pointed by q then in this we may need traverse the link list once to get its preceding node for link adjustment hence O(n)????
asked
Sep 20
in
DS
by
eyeamgj
Active
(
5.1k
points)

23
views
0
votes
0
answers
37
SELF DOUBT
https://gateoverflow.in/80298/gate19871xv THERE SHOULD BE SPECIFIED POSITION FOR INSERTION ?? OR ALWAYS TWO ??
asked
Sep 20
in
DS
by
eyeamgj
Active
(
5.1k
points)

20
views
+1
vote
1
answer
38
Discrete mathematics and its application ,kenneth h rosen ,seventh edition,chapter 8, exercise 8.4 ques 6
answered
Sep 19
in
DS
by
Pintu4146
(
11
points)

47
views
kennethrosen
discretemathematics
graphconnectivity
connected
component
0
votes
0
answers
39
SELF DOUBT
https://gateoverflow.in/3463/gate2007it30 WHAT IF THE QUEUE HAS FIXED LENGTH SAY CAN CONTAIN ONLY 4 ELEMENTS AND QUEUE IS COMPLETELY FILLED? THEN WHAT WILL BE THE ANSWER?
asked
Sep 19
in
DS
by
eyeamgj
Active
(
5.1k
points)

21
views
0
votes
0
answers
40
SELF DOUBT
WE KNOW THAT ENQUEUE AND DQ TAKES O(1) IN QUEUE INPLEMENTATION USING ARRAY SUPPOSE I WANT TO IMPLEMENT QUEUE USING ARRAY AND I HAVE A SCENARIO OF ARRAY 24 32 55 3 43 FRONT REAR NOW I DELETE 24 THEN IT WILL TAKE O(1) TO DELETE 32 55 3 43 FRONT REAR NOW I WANT TO ... LEFT POSITION THAN IT WILL TAKE O(N) TO SLIDE LEFT ...SO THE TIME COMPLEXITY TO DELETE AN ELEMENT IN QUEUE IS O(1)OR O(N)
asked
Sep 18
in
DS
by
eyeamgj
Active
(
5.1k
points)

10
views
To see more, click for all the
questions in this category
.
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
Members at the site
Dishank
akash.dinkar12
Rajucse
Kshitija
Naresh515
vivek_mishra
Recent Posts
List of Available Exams
New Assignment on Network programming : P2P simulation
Theory of Computation  GO Classroom
Probability  GO Classroom
Daily Quiz
All categories
General Aptitude
1.4k
Engineering Mathematics
5.9k
Digital Logic
2.3k
Programming & DS
4.3k
Programming
3.1k
DS
1.1k
Algorithms
3.7k
Theory of Computation
4.6k
Compiler Design
1.7k
Operating System
3.4k
Databases
3.4k
CO & Architecture
2.9k
Computer Networks
3.4k
Non GATE
1.2k
Others
1.3k
Admissions
506
Exam Queries
482
Tier 1 Placement Questions
22
Job Queries
64
Projects
15
Follow @csegate
Gatecse
Recent questions and answers in DS
Recent Blog Comments
Nice 2 know. You are welcome. :)
Hello @Arjun, I got books now...thanks for your...
You may contact FedEx local delivery office. It...
Yes you are right, it's showing this status from...
FedEx delivery is shown and as per that it is out...
40,903
questions
47,560
answers
146,294
comments
62,306
users