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

I forgot my password
Activity
Questions
Unanswered
Tags
Subjects
Users
Ask
Prev
Blogs
New Blog
Exams
Recent questions and answers in DS
0
votes
0
answers
1
NIELIT 2016 MAR Scientist B  Section C: 21
A polynomial $p(x)$ is such that $p(0)=5, p(1)=4, p(2)=9\:\text{and}\:p(3)=20$. The minimum degree it can have is $1$ $2$ $3$ $4$
asked
1 day
ago
in
DS
by
Lakshman Patel RJIT
Veteran
(
61.3k
points)

7
views
nielit2016marscientistb
+4
votes
4
answers
2
GATE2020CS41
In a balanced binary search tree with $n$ elements, what is the worst case time complexity of reporting all elements in range $[a,b]$? Assume that the number of reported elements is $k$. $\Theta (\log n)$ $\Theta (\log n +k)$ $\Theta (k \log n)$ $\Theta ( n \log k)$
answered
3 days
ago
in
DS
by
Dixith Reddy
(
67
points)

1.3k
views
gate2020cs
datastructures
0
votes
1
answer
3
UGCNETDec2007II: 12
Consider the following linked list : Which of the following piece of code will insert the node pointed to by q at the end of the list ? $\text{for (p=list; p !=NULL; p=p → next);}\\ p=q;$ $\text{for (p=list; p !=NULL; p=p → next);}\\ \text{p→next=q;}$ $\text{for (p=list; p→next !=NULL; p=p → next);}\\ p=q;$ $\text{for (p=list; p→next !=NULL; p=p → next);}\\ p→next=q;$
answered
3 days
ago
in
DS
by
Harsh Sonwani
(
19
points)

16
views
ugcnetdec2007ii
0
votes
1
answer
4
UGCNETDec2007II: 22
Which of the following data structure is used to implement recursion ? Arrays. Stacks. Queues. Linked lists.
answered
3 days
ago
in
DS
by
chirudeepnamini
Loyal
(
5.3k
points)

16
views
ugcnetdec2007ii
0
votes
0
answers
5
UGCNETDec2007II: 21
Consider a rooted tree in which every node has at least three children. What is the minimum number of nodes at level i (i > $0$) of the tree ? Assume that the root is at level $0$: $3^i$ $3i$ $3$ $3i+1$
asked
4 days
ago
in
DS
by
jothee
Veteran
(
107k
points)

11
views
ugcnetdec2007ii
0
votes
0
answers
6
UGCNETDec2007II: 23
The height of a binary tree with n nodes, in the worst case is : $O(log n)$ $O(n)$ $\Omega(n\log n)$ $\Omega(n^2)$
asked
4 days
ago
in
DS
by
jothee
Veteran
(
107k
points)

8
views
ugcnetdec2007ii
0
votes
0
answers
7
UGCNETDec2006II: 11
When a function is recursively called, all automatic variables : are initialized during each execution of the function. are retained from the last execution. are maintained in a stack. are ignored.
asked
5 days
ago
in
DS
by
jothee
Veteran
(
107k
points)

11
views
ugcnetdec2006ii
0
votes
0
answers
8
UGCNETDec2006II: 23
What is the time required to insert an element in a stack with linked implementation ? $O (log_2^n)$ $O (n)$ $O (n\:log_2^n)$ $O (1)$
asked
5 days
ago
in
DS
by
jothee
Veteran
(
107k
points)

13
views
ugcnetdec2006ii
0
votes
0
answers
9
UGCNETDec2006II: 24
The equivalent postfix expression for $d{\large /}(e+f)+b*c$ : $defbc/++*$ $def+/bc+*$ $def+/bc*+$ None of these.
asked
5 days
ago
in
DS
by
jothee
Veteran
(
107k
points)

11
views
ugcnetdec2006ii
0
votes
0
answers
10
UGCNETDec2006II: 25
Which one of the following is a physical data structure ? Array Linked lists Stacks Tables
asked
5 days
ago
in
DS
by
jothee
Veteran
(
107k
points)

8
views
ugcnetdec2006ii
0
votes
0
answers
11
UGCNETDec2004II: 32
Which of the following is not collision resolution technique ? Hash addressing. Chaining. Both (A) and (B). Indexing.
asked
5 days
ago
in
DS
by
jothee
Veteran
(
107k
points)

17
views
ugcnetdec2004ii
0
votes
0
answers
12
UGCNETDec2004II: 21
What item is at the root after the following sequence of insertions into an empty splay tree : $1, 11, 3, 10, 8, 4, 6, 5, 7, 9, 2, ?$ $1$ $2$ $4$ $8$
asked
6 days
ago
in
DS
by
jothee
Veteran
(
107k
points)

10
views
ugcnetdec2004ii
0
votes
0
answers
13
UGCNETDec2004II: 22
Suppose we are implementing quadratic probing with a Hash function, Hash (y)=X mode $100$. If an element with key $4594$ is inserted and the first three locations attempted are already occupied, then the next cell that will be tried is : $2$ $3$ $9$ $97$
asked
6 days
ago
in
DS
by
jothee
Veteran
(
107k
points)

7
views
ugcnetdec2004ii
0
votes
0
answers
14
UGCNETDec2004II: 24
What operation is supported in constant time by the doubly linked list, but not by the singly linked list ? Advance. Backup. First. Retrieve.
asked
6 days
ago
in
DS
by
jothee
Veteran
(
107k
points)

10
views
ugcnetdec2004ii
+10
votes
8
answers
15
GATE2020CS16
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)$
answered
Mar 23
in
DS
by
Raj Kumar 7
Active
(
1.2k
points)

3.8k
views
gate2020cs
linkedlists
+1
vote
4
answers
16
GATE2020CS5
The preorder traversal of a binary search tree is $15, 10, 12, 11, 20, 18, 16, 19$. Which one of the following is the postorder traversal of the tree? $10,11,12,15,16,18,19,20$ $11,12,10,16,19,18,20,15$ $20,19,18,16,15,12,11,10$ $19,16,18,20,11,12,10,15$
answered
Mar 23
in
DS
by
Raj Kumar 7
Active
(
1.2k
points)

1.1k
views
gate2020cs
binarysearchtree
0
votes
2
answers
17
Self Doubt on Linked List
Can somebody write the code or algorithm, how merge sort works efficiently in linked list? Is Heap sort most inefficient in Linked List Sorting? Elaborate plz
answered
Mar 20
in
DS
by
smsubham
Boss
(
16k
points)

77
views
linkedlists
datastructures
+2
votes
2
answers
18
Linked List
Which of the following is worst choice to sort a linked list? a)Merge Sort b) Quick Sort c) heap sort d) Insertion sort
answered
Mar 20
in
DS
by
smsubham
Boss
(
16k
points)

339
views
linkedlists
datastructures
+1
vote
1
answer
19
BST01
In deleting the root element of a BST, we have to replace root with _________ a)Inorder successor b)Inorder predecessor c)Both a and b
answered
Mar 20
in
DS
by
smsubham
Boss
(
16k
points)

82
views
datastructures
bst
+1
vote
2
answers
20
Worst Case Time Complexity
What is the worst case time complexity to find kth smallest element into an array of ‘n’ element?
answered
Mar 20
in
DS
by
smsubham
Boss
(
16k
points)

461
views
algorithms
timecomplexity
datastructures
sorting
+3
votes
1
answer
21
DFS depth first search
answered
Mar 20
in
DS
by
smsubham
Boss
(
16k
points)

126
views
datastructures
dfs
graphalgorithms
graphconnectivity
+1
vote
2
answers
22
AVL Tree
Suppose we have an AVL tree of n nodes and any change in the tree violates the AVL tree property then : S1: If we insert an element in the tree, maximum 2 Rotations are required to make the Tree AVL again. S2: If we delete an element from the tree, maximum 2 Rotations are required to make tree AVL again Which are correct statements?
answered
Mar 20
in
DS
by
smsubham
Boss
(
16k
points)

119
views
avltree
datastructures
tree
0
votes
1
answer
23
MadeEasy Test Series: Programming & DS  Stack And Queues
Consider the following statements: S1 : Implementation of stack using queue, deletion of second element from top of stack time complexity Ο(n), when insertion take Ο(1) time. S2 : In implementation of queue using stack, ... . Both the statements are true. HOW? Kindly provide a detailed explanation. I am unable to solve such questions.
answered
Mar 20
in
DS
by
smsubham
Boss
(
16k
points)

273
views
madeeasytestseries
datastructures
stack
queues
+16
votes
2
answers
24
GATE2004IT52
A program attempts to generate as many permutations as possible of the string, '$abcd$' by pushing the characters $a, b, c, d$ in the same order onto a stack, but it may pop off the top character at any time. Which one of the following strings CANNOT be generated using this program? $abcd$ $dcba$ $cbad$ $cabd$
answered
Mar 19
in
DS
by
immanujs
Active
(
3.3k
points)

1.2k
views
gate2004it
datastructures
normal
stack
0
votes
3
answers
25
MY DOUBT: Worst case space complexity of Quick sort (NOT FOR A STRAIGHT ANSWER)
First read it properly. I am not asking a specific question about space complexity. Question: What is worst case space complexity of quick sort? Everywhere it is showing O(logn). My understanding about it: I know that Quick ... done by ratio 1:n1 which is worst case, wouldn't it be requesting for O(n) stack records?
answered
Mar 19
in
DS
by
smsubham
Boss
(
16k
points)

282
views
algorithms
sorting
datastructures
spacecomplexity
0
votes
2
answers
26
File allocation
1) Search time for file in linked allocation is more than in contiguous allocation. 2)Contiguous allocation scheme efficiently implement fixed size file. Plz explain which one true and which one false? (In answer they considered in linked allocation external fragmentation not exist but contiguous allocation it exists)
answered
Mar 19
in
DS
by
smsubham
Boss
(
16k
points)

108
views
operatingsystem
filesystem
0
votes
2
answers
27
NIELIT 201884
For the given nodes: $89, 19, 50, 17, 12, 15, 2, 5, 7, 11, 6, 9, 100$ minimum ______ number of interchanges are required to convert it into a maxheap. $3$ $4$ $5$ $6$
answered
Mar 18
in
DS
by
topper98
Junior
(
589
points)

69
views
nielit2018
heap
datastructures
+1
vote
3
answers
28
NIELIT 201854
______ to evaluate an expression without any embedded function calls. Two stacks are required one stack is needed Three stacks are required More than three stacks are required
answered
Mar 18
in
DS
by
topper98
Junior
(
589
points)

118
views
nielit2018
stack
expressionevaluation
+36
votes
8
answers
29
GATE2006IT9
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$
answered
Mar 13
in
DS
by
vivekgatecs2020
(
137
points)

5.8k
views
gate2006it
datastructures
binarytree
normal
+7
votes
4
answers
30
number of ordered trees
The number of possible ordered trees with 3 nodes A, B, C is: (a) 16 (b) 12 (c) 6 (d) 10 what is ordered tree alignment?
answered
Mar 11
in
DS
by
Patty6397
(
11
points)

5.6k
views
+18
votes
3
answers
31
GATE19961.15
Which of the following sequences denotes the post order traversal sequence of the below tree? $f\; e\; g\; c\; d\; b\; a$ $g\; c\; b\; d\; a\; f\; e$ $g\; c\; d\; b\; f\; e\; a$ $f\; e\; d\; g\; c\; b \;a$
answered
Mar 9
in
DS
by
smsubham
Boss
(
16k
points)

1k
views
gate1996
datastructures
binarytree
easy
+1
vote
2
answers
32
Insertion in Hash table. (M.E.)
The number of different insertion sequences of numbers $\left \{ 7,20,32,50,66,77 \right \}$ on an initially empty hash table H of size $6$ and a hash function $h\left ( k \right )=k\mod6$ with linear probing scheme for collision resolution such that the hash table obtained ... ${\color{Blue} {2}}$ ${\color{Blue} {3}}$. ${\color{Blue} {4}}$ ${\color{Blue} {5}}$
answered
Mar 7
in
DS
by
smsubham
Boss
(
16k
points)

248
views
hashing
datastructures
+15
votes
3
answers
33
GATE19952.22
Which of the following statements is true? As the number of entries in a hash table increases, the number of collisions increases. Recursive programs are efficient The worst case complexity for Quicksort is $O(n^2)$ Binary search using a linear linked list is efficient I and II II and III I and IV I and III
answered
Mar 7
in
DS
by
immanujs
Active
(
3.3k
points)

2.5k
views
gate1995
datastructures
linkedlists
hashing
+1
vote
4
answers
34
ISRO202018
Consider a $2$dimensional array $x$ with $10$ rows and $4$ columns, with each element storing a value equivalent to the product of row number and column number. The array is stored in rowmajor format. If the first element $x[0][0]$ occupies the memory location ... , which all locations (in decimal) will be holding a value of $10$? $1018,1019$ $1022,1041$ $1013,1014$ $1000,1399$
answered
Mar 3
in
DS
by
DKY123
(
11
points)

568
views
isro2020
datastructures
arrays
normal
+15
votes
8
answers
35
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
Feb 29
in
DS
by
immanujs
Active
(
3.3k
points)

2.6k
views
gate2002
easy
datastructures
linkedlists
+3
votes
2
answers
36
Double hashing
How many probes takes place to insert a sequence of numbers: 14, 17, 25, 37, 34, 16, 26, into a hash table of size 11, using Double hashing, where h(x) = x mod 11, h2(x) = x mod 7 + 1 ? I am getting collision even after using h2(x) for 16 Please somebody can explain it? Given solution :
answered
Feb 24
in
DS
by
abhi97.dutta
(
49
points)

602
views
hashing
datastructures
+1
vote
2
answers
37
ISRO202024
In linear hashing, if blocking factor $bfr$, loading factor $i$ and file buckets $N$ are known, the number of records will be $cr= i+bfr+N$ $r=ibfrN$ $r=i+bfrN$ $r=i*bfr*N$
answered
Feb 23
in
DS
by
JashanArora
Loyal
(
8.3k
points)

185
views
isro2020
datastructures
hashing
normal
+1
vote
3
answers
38
ISRO202020
The minimum height of an AVL tree with $n$ nodes is $Ceil\ (\log_2(n+1))$ $1.44\ \log_2n$ $Floor\ (\log_2(n+1))$ $1.64\ \log_2n$
answered
Feb 22
in
DS
by
JashanArora
Loyal
(
8.3k
points)

452
views
isro2020
datastructures
avltree
normal
+2
votes
3
answers
39
ISRO202072
A stack is implemented with an array of $A[0...N1]$' and a variable $pos$'. The push and pop operations are defined by the following code. push (x) A[pos] < x pos < pos 1 end push pop() pos < pos+1 return A[pos] end ... will initialize an empty stack with capacity $N$ for the above implementation $pos \leftarrow 1$ $pos\leftarrow 0$ $pos\leftarrow 1$ $pos\leftarrow N1$
answered
Feb 21
in
DS
by
JashanArora
Loyal
(
8.3k
points)

165
views
isro2020
datastructures
stack
normal
+1
vote
3
answers
40
Made Easy Test Series:Binary Trees
Consider the following function height, to which pointer to the root node of a binary tree shown below is passed Note that max(a,b) defined by #define max(a,b) (a>b)?a:b. int height(Node *root) The output of the above code will be _________________
answered
Feb 13
in
DS
by
Pratyush Priyam Kuan
Active
(
1.1k
points)

240
views
madeeasytestseries
binarytree
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
Recent Posts
IITGN PGDIIT Fees/Placement/other info.
Online Python Programming Course by IIT Kanpur
CCMT (Portal for NIT admission) is now open
Generating Functions  All you need to know for GATE
The Truth about M.Tech Placements at IIIT Allahabad.
All categories
General Aptitude
1.9k
Engineering Mathematics
7.6k
Digital Logic
2.9k
Programming and DS
5k
Programming
3.6k
DS
1.4k
Algorithms
4.4k
Theory of Computation
6.2k
Compiler Design
2.2k
Operating System
4.5k
Databases
4.1k
CO and Architecture
3.4k
Computer Networks
4.2k
Non GATE
1.5k
Others
2.2k
Admissions
595
Exam Queries
573
Tier 1 Placement Questions
23
Job Queries
72
Projects
18
Follow @csegate
Recent questions and answers in DS
Recent Blog Comments
It has been modified. For online admission you...
Is it true that final year students are not...
Is it true ?
I looked into its syllabus and there are some...
kudos bro you made it
51,840
questions
58,630
answers
200,017
comments
111,640
users