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 and answers in DS
40
votes
7
answers
1
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 ++$
D Trump
answered
in
DS
6 days
ago
by
D Trump
33.1k
views
gate1995
data-structures
stack
easy
0
votes
1
answer
2
Data structure: hashing
A hash table has spaces for 50 records. Then the probability of collision before the table is 10% full is_______. 10% of 50 = 5, so we need to find the probability of collision before we insert 5 slots. *When hash table empty, prob. of ... no. of slots = 200 then probability = 0.95 Why probability of collision is increasing very rapidly? Please give a detailed explanation.
shishir__roy
answered
in
DS
Sep 14
by
shishir__roy
333
views
hashing
data-structures
2
votes
3
answers
3
Made Easy Test Series:Data Structure-Stack
There is given a infix expression: ${\color{Red} {1}}$ $A+B\times C/\left ( \left ( D+E \right )+F\times G \right )$ While converting infix expression to postfix expression number of symbols in the stack at indicated ... $5$, but is it correct? Can anyone give some explanation??
DAWID15
answered
in
DS
Sep 13
by
DAWID15
697
views
made-easy-test-series
data-structures
stack
10
votes
2
answers
4
GO Classes Weekly Quiz 9 | Data Structures | Linked List | Question: 5
Consider a function findCLL that takes a doubly circular linked list head and an integer value as input. One example of doubly circular linked list is given below - int findCLL(struct node * first, int n) { while (first -> value != n) ... $\text{S2}$ is True but $\text{S1}$ is False. Both are True. Both are False.
Anshuman Panda
answered
in
DS
Sep 12
by
Anshuman Panda
286
views
goclasses_wq9
goclasses
data-structures
linked-list
1-mark
6
votes
2
answers
5
GO Classes Weekly Quiz 9 | Data Structures | Linked List | Question: 3
What is the run-time complexity of inserting a new element at the beginning of a circular, doubly-linked list with a head? $O(1)$ $O(\log \text{N})$ $O(\text{N})$ $O(\text{N}^2)$
Anshuman Panda
answered
in
DS
Sep 12
by
Anshuman Panda
269
views
goclasses_wq9
goclasses
data-structures
linked-list
time-complexity
1-mark
0
votes
0
answers
6
data structure using c, by yaswant kanethkar
Explain the method to calculate the address of an element in an array. A 25*4 matrix array DATA is stored in memory in ‘row-major order’. If base address is 200 and 4 words per memory cell. Calculate the address of DATA [12, 3]…??
akama
asked
in
DS
Sep 11
by
akama
100
views
data-structures
array
matrix
0
votes
1
answer
7
Algorithms
Given ‘N’ objects, which are coloured as red, white and blue. Sort these objects so that objects of the same colour are adjacent, with the colours in the order red, white and blue. Design an algorithm with a time com- plexity of O(nlog n)
DebSujit
answered
in
DS
Sep 9
by
DebSujit
174
views
algorithms
sorting
time-complexity
0
votes
0
answers
8
Data structures and algorithms
Assume Two-Dimensional Sorted Array (TDSA) is a two-dimensional matrix of size n × n such as the elements in the matrix are sorted row-wise and column-wise. For example, the following matrix is a TDSA. 1 2 3 4 5 6 7 8 9 Write an algorithm that should convert the given matrix of a dimension n × n into TDSA. Analyse the running time of the algorithm.
Karthi2003
asked
in
DS
Sep 9
by
Karthi2003
109
views
algorithms
sorting
time-complexity
0
votes
0
answers
9
Data structures and algorithms
Compute the running time for the following algorithm ALGORITHM RKU(a,k,n) //Input: a is an array of n element and k is a value { if( k == n) then { WRITE(a[1:n]); return 0; } else { for i ← k to n do { t ← a[k]; a[k] ← a[i]; a[i] ← t; RKU(a, k+1, n); t ← a[k]; a[k] ← a[i]; a[i] ← t; } }
Karthi2003
asked
in
DS
Sep 9
by
Karthi2003
109
views
algorithms
time-complexity
0
votes
1
answer
10
Trees
In GATE if questions just mention a tree then should we assume it to be a directed or undirected tree? Also, if we are having an undirected tree then does the child node contains a pointer to the parent node?
felix59
answered
in
DS
Sep 5
by
felix59
61
views
tree
4
votes
4
answers
11
GATE Overflow | Data Structures | Test 1 | Question: 5
A stack is used to implement a priority queue where $ENQUEUE(Q, x, p)$ ($p$ denotes priority, higher the better) and $DEQUE(Q)$ are implemented by appropriate PUSH and POP operations such that $DEQUE(Q)$ happens in $O(1)$. ... second element denotes the priority. No. of POP operations required on the given stack for $ENQUEUE(Q, 2, 0)$ is _____
Udhay_Brahmi
answered
in
DS
Sep 2
by
Udhay_Brahmi
552
views
go-ds-1
data-structures
stack
priority-queue
numerical-answers
2
votes
3
answers
12
GATE Overflow | Data Structures | Test 1 | Question: 7
A $2-3$ tree is a tree such that all internal nodes have either 2 or 3 children all paths from root to the leaves have the same length. The maximum number of nodes of a 2-3 tree having 9 leaves is ___
Udhay_Brahmi
answered
in
DS
Sep 2
by
Udhay_Brahmi
512
views
go-ds-1
data-structures
numerical-answers
tree
2
votes
1
answer
13
Algorithm which uses Max heap to find i smallest elements
Can anyone please explain how to find “ i “ smallest elements from an array whose elements are distinct Please use max heap to explain the working input : n distinct elements output : i smallest elements
[ Jiren ]
answered
in
DS
Sep 2
by
[ Jiren ]
85
views
algorithms
binary-heap
data-structures
3
votes
1
answer
14
Data Structures,Algorithms&Applications In c++ page-249 Q-34
In an n x n C-matrix, all terms other than those in row 1, row n, and column 1 are zero. A C-matrix has at most 3n-2 nonzero terms. A C-matrix may be compactly stored in one-dimensional array by first storing row 1, then row n, and then the remaining column 1 elements. Calculate the location of an element A(i, j)?
shishir__roy
answered
in
DS
Aug 28
by
shishir__roy
163
views
data-structures
array
matrix
0
votes
3
answers
15
UPPCL AE 2018:60
The following function attempts to merge two sorted linked lists. ListNode is the custom structure representing a node in the linked list. ListNode* Merge(ListNode* pHead1, ListNode* pHead2) { ListNode* pMergedHead = NULL; if (pHead1->m_nValue < pHead2->m_nValue) { pMergedHead = pHead1; ... $\text{II} $ and $\text{III}$ $\text{I} $ and $\text{III}$ $\text{I}$ only
Lotan Chatterjee
answered
in
DS
Aug 28
by
Lotan Chatterjee
217
views
uppcl2018
data-structures
linked-list
1
vote
1
answer
16
NIELIT 2016 MAR Scientist B - Section C: 18
Traversing a binary tree first root and then left and right subtrees called ______ traversal. postorder. preorder. inorder. none of these.
Ratul Chatterjee
answered
in
DS
Aug 25
by
Ratul Chatterjee
996
views
nielit2016mar-scientistb
data-structures
binary-tree
tree-traversal
0
votes
1
answer
17
data structure
Consider a standard Circular Queue ‘q’ implementation (which has the same condition for Queue Full and Queue Empty) whose size is 11 and the elements of the queue are q[1], q[2], ……, q[10]. The front and rear pointer are initialized to point at q[2]. In which position will the ninth element be added?
jugnu1337
asked
in
DS
Jul 18
by
jugnu1337
128
views
data-structures
test-series
0
votes
2
answers
18
MadeEasy Test Series
There are 15 vertices and 15 edges in some graph. Now, these edges are arranged in such a way that maximum number of connected components are created in the graph. Find the connected components created. (A) 8 (B) 9 (C) 10 (D) 11 Please explain your answer.
anupamsworld
asked
in
DS
Jul 8
by
anupamsworld
226
views
made-easy-test-series
data-structures
graph-theory
graph-connectivity
0
votes
1
answer
19
For which of the following does there exist a tree satisfying the specified constraints? (a) A binary tree with 65 leaves and height 6. (b) A binary tree with 33 leaves and height 5.
qweas8671
asked
in
DS
Jul 3
by
qweas8671
124
views
binary-tree
0
votes
1
answer
20
Number of max heaps
Someone please explain the login behind the explanation.
GateOverflow04
asked
in
DS
Jun 30
by
GateOverflow04
123
views
ace-test-series
heap
0
votes
1
answer
21
Introduction to Alogrithm
Number of max heap possible with n distinct keys.
GateOverflow04
asked
in
DS
Jun 29
by
GateOverflow04
89
views
data-structures
binary-heap
0
votes
1
answer
22
The expression in postfix notation corresponding to the prefix notation ++A*B+CD*+EFG is
Arunava Samanta
asked
in
DS
Jun 28
by
Arunava Samanta
67
views
infix-prefix
0
votes
0
answers
23
how to Implement arrays using linked lists (and vice versa)?
how to Implement arrays using linked lists (and vice versa)? Like if we implement a linked list using an array .then we can maintain two arrays. In one array we will maintain the data and in another array, we will store ... it accordingly, whether this is correct? Also how to implement an array using a linked list..is this even possible?
samarpita
asked
in
DS
May 21
by
samarpita
196
views
algorithms
array
linked-list
data-structures
0
votes
0
answers
24
Self Doubt - BFT Applications
Can we use BFT for finding no. of connected components in a directed as well as undirected graph?
Vallari Garg
asked
in
DS
May 17
by
Vallari Garg
102
views
breadth-first-search
8
votes
2
answers
25
GO Classes Weekly Quiz 9 | Data Structures | Linked List | Question: 1
Consider the following function that takes reference to head of a Doubly Linked List as parameter. Assume that a node of doubly linked list has previous pointer as $\textit{prev}$ ... $6 \leftrightarrow 5 \leftrightarrow 4 \leftrightarrow 3 \leftrightarrow 1 \leftrightarrow 2$
GO Classes
asked
in
DS
May 5
by
GO Classes
1.7k
views
goclasses_wq9
goclasses
data-structures
linked-list
1-mark
6
votes
2
answers
26
GO Classes Weekly Quiz 9 | Data Structures | Linked List | Question: 2
Consider the following function Merge() that takes the head of two linked lists. struct node { int value; struct node *next; }; typedef struct node Node; Node * Merge(Node * head1, Node * head2) { if (head1 == ... $\text{List}2: 2\rightarrow 4\rightarrow 6\rightarrow 8\rightarrow 10 \rightarrow 12\rightarrow \text{Null}$
GO Classes
asked
in
DS
May 5
by
GO Classes
468
views
goclasses_wq9
goclasses
data-structures
linked-list
multiple-selects
1-mark
9
votes
1
answer
27
GO Classes Weekly Quiz 9 | Data Structures | Linked List | Question: 4
Given a circular, doubly-linked list whose contents are sorted in ascending order, what is the run-time complexity for inserting a new element into the list so that it remains correctly sorted? (Including the time required to search for the element’s correct position.) $O(1)$ $O(\log \text{N})$ $O(N)$ $O(\text{N}^{2})$
GO Classes
asked
in
DS
May 5
by
GO Classes
365
views
goclasses_wq9
goclasses
data-structures
linked-list
time-complexity
1-mark
6
votes
2
answers
28
GO Classes Weekly Quiz 9 | Data Structures | Linked List | Question: 6
Consider the following Doubly Linked List: If head points to the first node of the linked list then what will be the output of the following node? head=head->next->next->next->prev; head->next->next->prev=head; printf("%d",head->next->next->prev->next->value); $1$ $3$ $5$ $7$
GO Classes
asked
in
DS
May 5
by
GO Classes
235
views
goclasses_wq9
goclasses
data-structures
linked-list
1-mark
8
votes
1
answer
29
GO Classes Weekly Quiz 9 | Data Structures | Linked List | Question: 7
Consider the following program. printlist() is a function that takes the head of a linked list and prints all nodes values separated by comma. Node is typedefed singly linked list type struct. void insert1(Node *head,int data) { Node *NewNode= (Node *) ... Line $\text{X}$ prints $1,2,3,4,5$ Line $\text{Y}$ prints $1,2,3,4,5$
GO Classes
asked
in
DS
May 5
by
GO Classes
323
views
goclasses_wq9
goclasses
data-structures
linked-list
multiple-selects
1-mark
7
votes
1
answer
30
GO Classes Weekly Quiz 9 | Data Structures | Linked List | Question: 9
Consider the following function fun() that takes the head of a linked list. struct node { int value; struct node *next; }; typedef struct node Node; int fun(Node *head){ if(head== NULL) return 1; Node *p,*q; p = ... $0$ is length of the linked list is even Function may go to infinite loop if there is a loop in linked list
GO Classes
asked
in
DS
May 5
by
GO Classes
437
views
goclasses_wq9
goclasses
data-structures
linked-list
2-marks
5
votes
3
answers
31
GO Classes Weekly Quiz 9 | Data Structures | Linked List | Question: 10
Consider the following function foo() which takes the head pointer of two singly-linked lists. struct node *foo(struct node *head1, struct node *head2) { struct node *final, *temp; if (head1 == NULL) return head2; if (head2 == NULL) return head1; temp = foo ... $1,2,3,4,5,7,8,10,9,10$ $1,2,3,4,5,8,7,10,9,10$ None of these
GO Classes
asked
in
DS
May 5
by
GO Classes
303
views
goclasses_wq9
goclasses
data-structures
linked-list
2-marks
3
votes
2
answers
32
GO Classes Weekly Quiz 9 | Data Structures | Linked List | Question: 11
A doubly linked list is declared as: struct Node { int Value; struct Node *prev; struct Node *next; }; Which of the following segment of code deletes the node pointed to by $\text{X}$ from the doubly linked list, if it is ... $; \text{X} \rightarrow$ next $\rightarrow$ prev $= \text{X} \rightarrow$ next; free(X);
GO Classes
asked
in
DS
May 5
by
GO Classes
260
views
goclasses_wq9
goclasses
data-structures
linked-list
2-marks
1
vote
1
answer
33
time complexity
what is T.C. of this code: for(i=1;i<=n;i++) for(j=1;j<=n;j=j+i) x=x+1;
jugnu1337
asked
in
DS
Apr 21
by
jugnu1337
189
views
time-complexity
0
votes
0
answers
34
Self Doubt
problem : You are climbing a staircase. It takes n steps to reach the top. Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb to the top? Q.here i am not understanding why these problem is following fibonacci series??
Kartiksarvaiya
asked
in
DS
Mar 18
by
Kartiksarvaiya
180
views
0
votes
0
answers
35
NPTEL Assignment of Hashing Techniques
Canadian postal codes have the format LDL DLD, where L is always a letter (between A-Z), D is always a digit (0-9), and is always a single space. For example, the postal code for the University of Waterloo is N2L 3G1. Devise a suitable hash function for this system.
rsansiya111
asked
in
DS
Mar 12
by
rsansiya111
176
views
data-structures
hashing
0
votes
1
answer
36
CRT-2022
Kindly help
rsansiya111
asked
in
DS
Feb 25
by
rsansiya111
135
views
array
0
votes
1
answer
37
CRT-2022
Kindly Help
rsansiya111
asked
in
DS
Feb 25
by
rsansiya111
118
views
data-structures
Help get things started by
asking a question
.
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
Aptitude Overflow Book
Participate in Machine Learning benchmarking
GATE Overflow Tikz Templates
UPSC One Time Registration OTR Online Form 2022
DRDO CEPTAM 10 Online Form 2022
Subjects
All categories
General Aptitude
(2.4k)
Engineering Mathematics
(8.9k)
Digital Logic
(3.2k)
Programming and DS
(5.7k)
Programming
(3.8k)
DS
(1.8k)
Algorithms
(4.5k)
Theory of Computation
(6.5k)
Compiler Design
(2.2k)
Operating System
(4.8k)
Databases
(4.4k)
CO and Architecture
(3.6k)
Computer Networks
(4.4k)
Non GATE
(1.2k)
Others
(2.5k)
Admissions
(644)
Exam Queries
(838)
Tier 1 Placement Questions
(17)
Job Queries
(72)
Projects
(9)
Unknown Category
(851)
Recent questions and answers in DS
Recent Blog Comments
Sir some test due date passed 1-2 months ago pls...
@lalitver10 There is no restriction in doing...
@GateOverflow04 link fixed now.
@Arjun @Deepak Sir, In Test Schedule google...
sir is this for gate? it has way more questions...