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 tagged datastructures
+4
votes
4
answers
1
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)$
asked
Feb 12
in
DS
by
Arjun
Veteran
(
436k
points)

1.4k
views
gate2020cs
datastructures
+1
vote
4
answers
2
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$
asked
Jan 13
in
DS
by
Satbir
Boss
(
25.5k
points)

587
views
isro2020
datastructures
arrays
normal
+1
vote
3
answers
3
ISRO202032
$G$ is an undirected graph with vertex set $\{v1,v2,v3,v4,v5,v6,v7\}$ and edge set $\{v1v2,\ v1v3,\ v1v4\ ,v2v4,\ v2v5,\ v3v4,\ v4v5,\ v4v6,\ v5v6,\ v6v7\ \}$. A breadth first search of the graph is performed with $v1$ as the root node. Which of the following is a tree edge ? $v2v4$ $v1v4$ $v4v5$ $v3v4$
asked
Jan 13
in
DS
by
Satbir
Boss
(
25.5k
points)

322
views
isro2020
datastructures
bfs
normal
+2
votes
3
answers
4
ISRO202071
Of the following which best approximates the ratio of the number of nonterminal nodes in the total number of nodes in a complete $K$ary tree of depth $N$ ? $1/N$ $N1/N$ $1/K$ $K1/K$
asked
Jan 13
in
DS
by
Satbir
Boss
(
25.5k
points)

245
views
isro2020
datastructures
trees
normal
+2
votes
2
answers
5
ISRO20204
Convert the prefix expression to infix $*+ABC*DE+FG$ $(AB)*C+(D*E)(F+G)$ $(A+B)*C(DE)*(FG)$ $(A+BC)*(DE)*(F+G)$ $(A+B)*C(D*E)(F+G)$
asked
Jan 13
in
DS
by
Satbir
Boss
(
25.5k
points)

233
views
isro2020
datastructures
infixprefix
normal
+1
vote
3
answers
6
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$
asked
Jan 13
in
DS
by
Satbir
Boss
(
25.5k
points)

456
views
isro2020
datastructures
avltree
normal
+2
votes
3
answers
7
ISRO202019
What is the inorder successor of $15$ in the given binary search tree? $18$ $6$ $17$ $20$
asked
Jan 13
in
DS
by
Satbir
Boss
(
25.5k
points)

137
views
isro2020
datastructures
binarysearchtree
easy
+2
votes
3
answers
8
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$
asked
Jan 13
in
DS
by
Satbir
Boss
(
25.5k
points)

170
views
isro2020
datastructures
stack
normal
+1
vote
2
answers
9
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$
asked
Jan 13
in
DS
by
Satbir
Boss
(
25.5k
points)

193
views
isro2020
datastructures
hashing
normal
+2
votes
3
answers
10
ISRO202023
The postorder traversal of binary tree is $ACEDBHIGF$. The preorder traversal is $ABCDEFGHI$ $FBADCEGIH$ $FABCDEGHI$ $ABDCEFGIH$
asked
Jan 13
in
DS
by
Satbir
Boss
(
25.5k
points)

326
views
isro2020
datastructures
binarytree
normal
+5
votes
3
answers
11
CMI2019A3
Suppose that the figure to the right is a binary search tree. The letters indicate the names of the nodes, not the values that are stored. What is the predecessor node, in terms of value, of the root node $A?$ $D$ $H$ $I$ $M$
asked
Sep 13, 2019
in
DS
by
gatecse
Boss
(
17.7k
points)

189
views
cmi2019
datastructures
trees
binarysearchtree
+2
votes
1
answer
12
CMI2018B7
A First In First Out queue is a data structure supporting the operation Enque, Deque, Print, Enque(x) adds the item $x$ to the tail of the queue. Deque removes the element at the head of the queue and returns its value. Print prints the head of the ... reverse order. If the queue had $n$ elements to begin with, how many statements would you need to print the queue in reverse order?
asked
Sep 13, 2019
in
DS
by
gatecse
Boss
(
17.7k
points)

94
views
cmi2018
datastructures
queues
descriptive
0
votes
0
answers
13
Cormen Edition 3 Exercise 10.2 Question 8 (Page No. 241)
Explain how to implement doubly linked lists using only one pointer value $x.np$ per item instead of the usual two (next and prev). Assume that all pointer values can be interpreted as $k$bit integers, and define $x.np$ ... $INSERT$, and $DELETE$ operations on such a list. Also, show how to reverse such a list in $O(1)$ time.
asked
Jun 30, 2019
in
Algorithms
by
akash.dinkar12
Boss
(
42.8k
points)

121
views
cormen
datastructures
linkedlists
descriptive
difficult
0
votes
1
answer
14
Cormen Edition 3 Exercise 10.2 Question 7 (Page No. 241)
Give a $\Theta(n)$ time nonrecursive procedure that reverses a singly linked list of $n$ elements. The procedure should use no more than constant storage beyond that needed for the list itself.
asked
Jun 30, 2019
in
Algorithms
by
akash.dinkar12
Boss
(
42.8k
points)

62
views
cormen
datastructures
linkedlists
descriptive
0
votes
0
answers
15
Cormen Edition 3 Exercise 10.2 Question 6 (Page No. 241)
The dynamicset operation $UNION$ takes two disjoint sets $S_1$ and $S_2$ as input, and it returns a set $S=S_1 \cup S_2$ consisting of all the elements of $S_1$ and $S_2$.The sets $S_1$ and $S_2$ are usually destroyed by the operation. Show how to support $UNION$ in $O(1)$ time using a suitable list data structure.
asked
Jun 30, 2019
in
Algorithms
by
akash.dinkar12
Boss
(
42.8k
points)

30
views
cormen
datastructures
linkedlists
descriptive
0
votes
0
answers
16
Cormen Edition 3 Exercise 10.2 Question 5 (Page No. 240)
Implement the dictionary operations $INSERT$, $DELETE$, and $SEARCH$ using singly linked, circular lists. What are the running times of your procedures?
asked
Jun 30, 2019
in
Algorithms
by
akash.dinkar12
Boss
(
42.8k
points)

46
views
cormen
datastructures
linkedlists
descriptive
0
votes
0
answers
17
Cormen Edition 3 Exercise 10.2 Question 4 (Page No. 240)
LISTSEARCH’(L, k) 1 x = L.nil.next 2 while x != L.nil and x.key != k 3 x = x.next 4 return x As written, each loop iteration in the LISTSEARCH’ procedure requires two tests: one for $x\neq L.nil$ and one for $x.key\neq k$. Show how to eliminate the test for $x\neq L.nil$ in each iteration.
asked
Jun 30, 2019
in
Algorithms
by
akash.dinkar12
Boss
(
42.8k
points)

29
views
cormen
datastructures
linkedlists
descriptive
0
votes
2
answers
18
Cormen Edition 3 Exercise 10.2 Question 3 (Page No. 240)
Implement a queue by a singly linked list $L$. The operations of $ENQUEUE$ and $DEQUEUE$ should still take $O(1)$ time.
asked
Jun 30, 2019
in
Algorithms
by
akash.dinkar12
Boss
(
42.8k
points)

38
views
cormen
datastructures
linkedlists
descriptive
0
votes
1
answer
19
Cormen Edition 3 Exercise 10.2 Question 2 (Page No. 240)
Implement a stack using a singly linked list $L$. The operations $PUSH$ and $POP$ should still take $O(1)$ time.
asked
Jun 30, 2019
in
Algorithms
by
akash.dinkar12
Boss
(
42.8k
points)

25
views
cormen
datastructures
linkedlists
descriptive
0
votes
0
answers
20
Cormen Edition 3 Exercise 10.2 Question 1 (Page No. 240)
Can you implement the dynamicset operation $INSERT$ on a singly linked list in $O(1)$ time? How about $DELETE$?
asked
Jun 30, 2019
in
Algorithms
by
akash.dinkar12
Boss
(
42.8k
points)

19
views
cormen
datastructures
linkedlists
descriptive
+2
votes
2
answers
21
Cormen Edition 3 Exercise 10.1 Question 7 (Page No. 236)
Show how to implement a stack using two queues. Analyze the running time of the stack operations.
asked
Jun 28, 2019
in
Algorithms
by
akash.dinkar12
Boss
(
42.8k
points)

105
views
cormen
datastructures
stack
descriptive
0
votes
1
answer
22
Cormen Edition 3 Exercise 10.1 Question 6 (Page No. 236)
Show how to implement a queue using two stacks. Analyze the running time of the queue operations.
asked
Jun 28, 2019
in
Algorithms
by
akash.dinkar12
Boss
(
42.8k
points)

38
views
cormen
datastructures
queues
descriptive
0
votes
1
answer
23
Cormen Edition 3 Exercise 10.1 Question 5 (Page No. 236)
Whereas a stack allows insertion and deletion of elements at only one end, and a queue allows insertion at one end and deletion at the other end, a deque (double ended queue) allows insertion and deletion at both ends. Write ... time procedures to insert elements into and delete elements from both ends of a deque implemented by an array.
asked
Jun 28, 2019
in
Algorithms
by
akash.dinkar12
Boss
(
42.8k
points)

73
views
cormen
algorithms
datastructures
queues
descriptive
0
votes
0
answers
24
Cormen Edition 3 Exercise 10.1 Question 4 (Page No. 235)
Rewrite ENQUEUE and DEQUEUE to detect underflow and overflow of a queue.
asked
Jun 28, 2019
in
Algorithms
by
akash.dinkar12
Boss
(
42.8k
points)

37
views
cormen
datastructures
queues
descriptive
0
votes
0
answers
25
Cormen Edition 3 Exercise 10.1 Question 3 (Page No. 235)
ENQUEUE(Q, x) 1 Q[Q.tail] = x 2 if Q.tail == Q.length 3 Q.tail = 1 4 else Q.tail = Q.tail + 1 DEQUEUE(Q) 1 x = Q[Q.head] 2 if Q.head == Q.length 3 Q.head = 1 4 else Q.head = Q.head + 1 5 return x illustrate the ... (Q,4),ENQUEUE(Q,1),ENQUEUE(Q,3),DEQUEUE(Q),ENQUEUE(Q,8),DEQUEUE(Q) on an initially empty queue $Q$ stored in array $Q[1...6]$.
asked
Jun 28, 2019
in
Algorithms
by
akash.dinkar12
Boss
(
42.8k
points)

45
views
cormen
datastructures
queues
descriptive
0
votes
1
answer
26
Cormen Edition 3 Exercise 10.1 Question 2 (Page No. 235)
Explain how to implement two stacks in one array $A[1...n]$ in such a way that neither stack overflows unless the total number of elements in both stacks together is $n$.The $PUSH$ and $POP$ operations should run in $O(1)$ time.
asked
Jun 28, 2019
in
Algorithms
by
akash.dinkar12
Boss
(
42.8k
points)

48
views
cormen
datastructures
stack
descriptive
0
votes
1
answer
27
Cormen Edition 3 Exercise 10.1 Question 1 (Page No. 235)
STACKEMPTY(S) 1 if S.top == 0 2 return TRUE 3 else return FALSE PUSH(S , x) 1 S.top = S.top + 1 2 S[S.top] = x POP(S) 1 if STACKEMPTY(S) 2 error underflow 3 else S.top = S.top  1 4 return S[S.top + 1] illustrate the result of ... $S$ stored in array $S[1...6]$
asked
Jun 28, 2019
in
Algorithms
by
akash.dinkar12
Boss
(
42.8k
points)

58
views
cormen
datastructures
stack
descriptive
+1
vote
2
answers
28
GEEKS FOR GEEKS GATE 2017 MOCK
If Kruskal’s algorithm is used for finding a minimum spanning tree of a weighted graph G with n vertices and m edges and edge weights are already given in a sorted list, then, What will be the time complexity to compute the minimum cost spanning tree given that union and find operations take amortized O(1) ? A O(m logn) B O(n) C O(m) D O(n logm)
asked
Jun 9, 2019
in
Algorithms
by
Hirak
Active
(
3.7k
points)

176
views
kruskalsalgorithm
graphalgorithms
greedyalgorithm
datastructures
+1
vote
0
answers
29
Allen Career Institute:Circular Queue
$1)$How circular queue can be implemented? $2)$ For which data structure circular queue cannot be implemented? $(A)$Array $(B)$ Singly Linked List $(C)$ Doubly Linked List $(D)$ Stack
asked
May 24, 2019
in
DS
by
srestha
Veteran
(
120k
points)

247
views
datastructures
circularqueue
0
votes
0
answers
30
Made Easy Test Series: Stack Address
A stack based CPU executes the instruction. Memory location $500$ contain $0X 88$ and memory location $700$ contain $0X37$. The stack pointer is at $0X003F$ The instruction are as follows: $I_{1}:PUSH$ $500$ $I_{2}:PUSH$. $700$ ... execution of instruction. $C)$ Memory location $600$ contain $0XBF$ after execution of instruction. $D)$ Both $a)$ and $c)$
asked
May 22, 2019
in
DS
by
srestha
Veteran
(
120k
points)

144
views
madeeasytestseries
datastructures
stack
Page:
1
2
3
4
5
6
...
39
next »
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
Everything falls into place just work hard and trust the process
GATECSE 2020 Admissions Live Discussion
BARC Interview Experience 2019
IITGN PGDIIT Fees/Placement/other info.
Online Python Programming Course by IIT Kanpur
Follow @csegate
Recent questions tagged datastructures
Recent Blog Comments
Congratulations 😊
Congratulations 😊
Congratulations Rituraj bro
My gate score is 694 Rank 805 Category Obc...
Why do you want to pursue PGDIIT at all? I think...
51,925
questions
58,888
answers
200,249
comments
112,734
users