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 Algorithms
0
votes
1
answer
1
self doubt
Solve the following recurrences using recursion tree method and write the asymptotic time complexity T(n)=T(n/2)+n^2
Bharat Bhushan
answered
in
Algorithms
Mar 15
by
Bharat Bhushan
97
views
time-complexity
recurrence-relation
1
vote
1
answer
2
Spanning Tree
Determine the number of the spanning treess in the following graph ???
ImPranav
answered
in
Algorithms
Mar 11
by
ImPranav
71
views
algorithms
spanning-tree
0
votes
0
answers
3
self doubt
Determine the number of spanning tree in the following graph ?
Çșȇ ʛấẗẻ
asked
in
Algorithms
Mar 10
by
Çșȇ ʛấẗẻ
67
views
algorithms
spanning-tree
0
votes
0
answers
4
Self Doubt
Determine the number of the spanning treess in the following graph ???
Çșȇ ʛấẗẻ
asked
in
Algorithms
Mar 10
by
Çșȇ ʛấẗẻ
37
views
algorithms
spanning-tree
0
votes
0
answers
5
Self doubt
Determine the number of the spanning treess in the following graph ???
Çșȇ ʛấẗẻ
asked
in
Algorithms
Mar 10
by
Çșȇ ʛấẗẻ
27
views
algorithms
spanning-tree
0
votes
1
answer
6
let T(n) a function of complexity satisfying T(0)=T(1)=Θ(1) and T(n)=Θ(n)+T(n−1)+T(n−2). what is the class of complexity of T(n) ?
ImPranav
answered
in
Algorithms
Mar 10
by
ImPranav
164
views
algorithms
time-complexity
0
votes
3
answers
7
Self Doubt
A recursion program without a terminating condition will provide infinite output. True/False?
ImPranav
answered
in
Algorithms
Mar 7
by
ImPranav
139
views
self-doubt
algorithms
recursion
0
votes
2
answers
8
Chose the correct big- Θ expression to describe: T(N) = T(N / 2) + Log(N/2); T(1) = 1
I
KG
answered
in
Algorithms
Mar 5
by
KG
94
views
algorithms
time-complexity
asymptotic-notations
0
votes
3
answers
9
NPTEL Assignment Question
Suppose there are k sorted lists (decreasing order) with n/k elements in each list. What is the time complexity to merge them into one single sorted list. Hint: Maintain a heap of k elements. Think which k elements to choose. A. O(nlogk) B. O(n) C. O(nk) D. O(nlogn)
[ Jiren ]
answered
in
Algorithms
Feb 24
by
[ Jiren ]
364
views
algorithms
nptel-quiz
sorting
time-complexity
3
votes
1
answer
10
GATE CSE 2023 | Question: 44
Consider functions $\textsf{Function_1}$ and $\textsf{Function_2}$ ... $f_{1}(n) \in \omega\left(f_{2}(n)\right)$ $f_{1}(n) \in O(n)$
DevUt
answered
in
Algorithms
Feb 18
by
DevUt
1.3k
views
gatecse-2023
algorithms
asymptotic-notations
multiple-selects
2-marks
1
vote
1
answer
11
GATE CSE 2023 | Question: 46
Let $U=\{1,2,3\}$. Let $2^{U}$ denote the powerset of $U$. Consider an undirected graph $G$ whose vertex set is $2^{U}$. For any $A, B \in 2^{U},(A, B)$ is an edge in $G$ if and only if (i) $A \neq B$, and (ii) ... $A$ is denoted by $\mathcal{B}(A)$. If $\emptyset$ denotes the empty set, then the cardinality of $\mathcal{B}(\emptyset)$ is ______________.
Shaik Masthan
answered
in
Algorithms
Feb 16
by
Shaik Masthan
873
views
gatecse-2023
algorithms
breadth-first-search
numerical-answers
2-marks
3
votes
1
answer
12
GATE CSE 2023 | Question: 10
An algorithm has to store several keys generated by an adversary in a hash table. The adversary is malicious who tries to maximize the number of collisions. Let $k$ be the number of keys, $m$ be the number of slots in the hash ... a carefully chosen constant. Universal hashing method. If $k$ is a prime number, use Division method. Otherwise, use Multiplication method.
admin
asked
in
Algorithms
Feb 15
by
admin
1.3k
views
gatecse-2023
algorithms
hashing
1-mark
3
votes
0
answers
13
GATE CSE 2023 | Question: 19
Let $f$ and $g$ be functions of natural numbers given by $f(n)=n$ and $g(n)=n^{2}.$ Which of the following statements is/are $\text{TRUE}?$ $f \in O(g)$ $f \in \Omega(g)$ $f \in o(g)$ $f \in \Theta(g)$
admin
asked
in
Algorithms
Feb 15
by
admin
1.3k
views
gatecse-2023
algorithms
asymptotic-notations
multiple-selects
1-mark
0
votes
0
answers
14
GATE CSE 2023 | Memory Based Question: 37
Time complexity f( ) { while(n>1) { for (i = 1 to n) { } n = n/2 } } g ( ) { for (i = 1 to 100n) { } } $f(x)=O(g(x))$ $f(x)=\theta(g(x))$ $f(x)=o(g(x))$ $f(x)=\omega(g(x))$
closed
GO Classes
asked
in
Algorithms
Feb 6
by
GO Classes
548
views
memorybased-gatecse2023
goclasses
algorithms
time-complexity
multiple-selects
3
votes
0
answers
15
Number of possible permutations that can be obtained using stack for input seq
Number of possible permutations that can be obtained using stack if the input sequence is 1, 2, 3, 4, 5 (in the order) is
h4kr
asked
in
Algorithms
Jan 31
by
h4kr
138
views
algorithms
stack
45
votes
11
answers
16
GATE IT 2007 | Question: 24
A depth-first search is performed on a directed acyclic graph. Let $d[u]$ denote the time at which vertex $u$ is visited for the first time and $f[u]$ the time at which the DFS call to the vertex $u$ terminates. Which of the following statements is always TRUE for all edges $(u, v)$ in the graph ? $d[u] < d[v]$ $d[u] < f[v]$ $f[u] < f[v]$ $f[u] > f[v]$
supreetshukla
answered
in
Algorithms
Jan 30
by
supreetshukla
10.6k
views
gateit-2007
algorithms
graph-algorithms
normal
graph-search
0
votes
1
answer
17
TestBook testseries question to find max weight of MST
A complete graph G with 5 nodes has positive weight edges, each node has a distinct weight with an integer value and maximum weight is equal to number of edges in G. What can be the maximum weight of minimum spanning tree for graph G?
Pranavpurkar
answered
in
Algorithms
Jan 30
by
Pranavpurkar
131
views
algorithms
minimum-spanning-tree
testbook-test-series
83
votes
11
answers
18
GATE CSE 2006 | Question: 48
Let $T$ be a depth first search tree in an undirected graph $G$. Vertices $u$ and $ν$ are leaves of this tree $T$. The degrees of both $u$ and $ν$ in $G$ are at least $2$ ... exist a cycle in $G$ containing $u$ and $ν$ There must exist a cycle in $G$ containing $u$ and all its neighbours in $G$
sameer_hack
answered
in
Algorithms
Jan 30
by
sameer_hack
17.2k
views
gatecse-2006
algorithms
graph-algorithms
normal
0
votes
1
answer
19
Countable languages in TOC
amit166
answered
in
Algorithms
Jan 28
by
amit166
864
views
regular-language
theory-of-computation
0
votes
0
answers
20
TestBook TestSeries Optimal Binary Search Tree Question
Construct OBST with the identifier set (a1, a2, a3) =(end , goto, print) with p(1..3) = (0.05, 0.2, 0.1) and q(0..3) = (0.2, 0.1,0.2, 0.05) What is the cost of a OBST ? What are the nodes present in the 2nd level of OBST if the root is present in level one ? 2.55 , print , goto 2.45 , goto , end 2.15, end, print 2.7, end, goto
Sahil_Lather
asked
in
Algorithms
Jan 28
by
Sahil_Lather
87
views
algorithms
binary-search-tree
testbook-test-series
0
votes
0
answers
21
TestBook TestSeries question to find number of paths in directed graph
Consider the following directed graph and assume the number of paths to reach to itself i.e. N(A) = 1. Number of paths from A to K are __
Sahil_Lather
asked
in
Algorithms
Jan 28
by
Sahil_Lather
68
views
algorithms
directed-acyclic-graph
testbook-test-series
0
votes
0
answers
22
TestBook testSeries dynamic programming and np problem question
Consider the following statements, which of the statement(s) is/are FALSE? The running time of dynamic programming algorithm is always θ (p) where p is number of subproblems When a recurrence relation has cyclic dependency, it is ... memorization If a problem X can be reduced to a known NP hard problem, then X must be NP-hard
Sahil_Lather
asked
in
Algorithms
Jan 28
by
Sahil_Lather
67
views
algorithms
dynamic-programming
testbook-test-series
53
votes
7
answers
23
GATE CSE 2015 Set 2 | Question: 45
Suppose you are provided with the following function declaration in the C programming language. int partition(int a[], int n); The function treats the first element of $a[\:]$ as a pivot and rearranges the array so that all elements less than or equal to the pivot is in the ... $(a, $ left_end$, k)$ $(a, n-$left_end$-1, k-$left_end$-1)$ and $(a, $left_end$, k)$
eliecher
answered
in
Algorithms
Jan 24
by
eliecher
13.1k
views
gatecse-2015-set2
algorithms
normal
sorting
0
votes
0
answers
24
Dijkstra Algorithm
Elaf
asked
in
Algorithms
Jan 22
by
Elaf
100
views
dijkstras-algorithm
0
votes
1
answer
25
UPPCL AE 2018:12
Given below are some famous algorithms and some algorithm design paradigms ... $\text{1-(c), 2-(b), 3-(a), 4-(b)}$
Hira Thakur
answered
in
Algorithms
Jan 21
by
Hira Thakur
194
views
uppcl2018
algorithms
greedy-algorithm
dynamic-programming
divide-and-conquer
0
votes
0
answers
26
Topic - Dijkstra Algorithm Question 5a
gate20232
asked
in
Algorithms
Jan 18
by
gate20232
70
views
algorithms
dijkstras-algorithm
0
votes
0
answers
27
Asymptotic Notation
Let $f(n)$ be a positive increasing function. Consider the below two statements: S1: if an algorithm is $\Theta(f(n))$ in the average case, then it is $\Omega(f(n))$ in the worst case. S2: if an algorithm is $\Theta(f(n))$ in the average case, then it is ... understand it mathematically. Also, $g(n) = \Theta(f(n))$ actually means $g(n)$ belongs to the set $\Theta(f(n))$, right?
kira000
asked
in
Algorithms
Jan 17
by
kira000
131
views
asymptotic-notations
algorithms
time-complexity
63
votes
10
answers
28
GATE CSE 2002 | Question: 2.10
Consider the following algorithm for searching for a given number $x$ in an unsorted array $A[1..n]$ having $n$ distinct values: Choose an $i$ at random from $1..n$ If $A[i] = x$, then Stop else Goto 1; Assuming that $x$ is present in $A$, what is the expected number of comparisons made by the algorithm before it terminates? $n$ $n-1$ $2n$ $\frac{n}{2}$
Johnny1001
answered
in
Algorithms
Jan 16
by
Johnny1001
18.4k
views
gatecse-2002
searching
normal
57
votes
7
answers
29
GATE CSE 2006 | Question: 12
To implement Dijkstra’s shortest path algorithm on unweighted graphs so that it runs in linear time, the data structure to be used is: Queue Stack Heap B-Tree
Johnny1001
answered
in
Algorithms
Jan 15
by
Johnny1001
27.5k
views
gatecse-2006
algorithms
graph-algorithms
easy
56
votes
9
answers
30
GATE CSE 2014 Set 3 | Question: 14
You have an array of $n$ elements. Suppose you implement quicksort by always choosing the central element of the array as the pivot. Then the tightest upper bound for the worst case performance is $O(n^2)$ $O(n \log n)$ $\Theta(n\log n)$ $O(n^3)$
Johnny1001
answered
in
Algorithms
Jan 15
by
Johnny1001
27.3k
views
gatecse-2014-set3
algorithms
sorting
easy
31
votes
6
answers
31
GATE CSE 1995 | Question: 1.16
For merging two sorted lists of sizes $m$ and $n$ into a sorted list of size $m+n$, we require comparisons of $O(m)$ $O(n)$ $O(m+n)$ $O(\log m + \log n)$
Johnny1001
answered
in
Algorithms
Jan 15
by
Johnny1001
42.5k
views
gate1995
algorithms
sorting
normal
4
votes
4
answers
32
NIELIT 2016 DEC Scientist B (CS) - Section B: 16
Two main measures for the efficiency of an algorithm are: Processor and Memory Complexity and Capacity Time and Space Data and Space
Johnny1001
answered
in
Algorithms
Jan 15
by
Johnny1001
75.8k
views
nielit2016dec-scientistb-cs
algorithms
time-complexity
7
votes
2
answers
33
number of spanning tree
Consider a complete bipartite graph with ‘m’ and ‘n’ vertices. If m = 4, n = 4, then the number of spanning trees of graph are ________.
Johnny1001
answered
in
Algorithms
Jan 15
by
Johnny1001
4.6k
views
algorithms
spanning-tree
numerical-answers
0
votes
0
answers
34
Test series
Can anyone solve this recurrence relation T(n) = 3T(n-1) + O(n^2) Its ans is O(3^n n^2)
MonuKhan
asked
in
Algorithms
Jan 12
by
MonuKhan
289
views
recurrence-relation
algorithms
time-complexity
asymptotic-notations
0
votes
0
answers
35
Quiz question
Given the tight asymptotic bound for the recurrence equation : T(n) = 2T($\frac{n }4{}$) + 1 O(√ n) Ω(√ n) θ(√ n) O(n^2) Using master's theorem, the result comes to be θ(√ n). Thus option A,B,C are definitely correct. According to the solutions option D ... get it why. Can't we write (√ n) = O(n^2) ? Or is it because we are asked for the tightest asymptotic bound? Please do let know!
Aryanzzzz
asked
in
Algorithms
Jan 12
by
Aryanzzzz
95
views
multiple-selects
0
votes
1
answer
36
How to solve this recurrence T(n)=17T(7n)+n^4
nishantsharma
answered
in
Algorithms
Jan 12
by
nishantsharma
188
views
algorithms
recurrence-relation
0
votes
1
answer
37
Algorithm Quiz
nishantsharma
answered
in
Algorithms
Jan 12
by
nishantsharma
118
views
algorithms
0
votes
1
answer
38
how to solve T(n)=2T(n/2)−n^3n with master theorem
how do i apply master theorem to this? T(n)=2T(n/2)−n^3n
nishantsharma
answered
in
Algorithms
Jan 12
by
nishantsharma
199
views
algorithms
master-theorem
recurrence-relation
asymptotic-notations
0
votes
1
answer
39
#self_doubt
T(n)={ 0:if n<1 1:if n==1 T(n-1)+T(n-2):n>1 } if the stack size is 48 bytes and one stack entry size =4 B then maximum n=? I thought it should be 13 but the answer is 12 T(1) and T(<1) should not be stored they are already given so can we take n=13 so the last call which will be stored will be T(2)
nishantsharma
answered
in
Algorithms
Jan 11
by
nishantsharma
140
views
algorithms
recurrence-relation
time-complexity
1
vote
1
answer
40
CS Data structures and algorithm 2022
Design an algorithm to construct one heap that contains all the elements of two given heaps of sizes n and m, respectively. The heaps are given in a linked-list representation ( each node has links to its two children). The running time of the algorithm should be O(log(m + n)) in the worst case
nishantsharma
answered
in
Algorithms
Jan 11
by
nishantsharma
137
views
algorithms
heap
time-complexity
To see more, click for all the
questions in this category
.
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
Central Pollution Control Board CPCB Various Post Recruitment 2023
MP Rajya Sahkari Apex Bank Various Post Recruitment 2023
NITIE MUMBAI throgh GATE
PGCIL recruitment 2023 – Apply Online For 138 Posts through GATE
Admission guidance for GATE CSE 2023
Subjects
All categories
General Aptitude
(2.6k)
Engineering Mathematics
(9.4k)
Digital Logic
(3.3k)
Programming and DS
(5.9k)
Algorithms
(4.6k)
Theory of Computation
(6.7k)
Compiler Design
(2.3k)
Operating System
(5.0k)
Databases
(4.6k)
CO and Architecture
(3.8k)
Computer Networks
(4.7k)
Non GATE
(1.3k)
Others
(2.5k)
Admissions
(655)
Exam Queries
(847)
Tier 1 Placement Questions
(17)
Job Queries
(77)
Projects
(9)
Unknown Category
(866)
Recent questions and answers in Algorithms
Recent Blog Comments
Please see the updated link.
Unfortunately there won't be a hardcopy coming...
this book is not available on amazon now, i want...
Yes
Hi! @AnkitMazumder14 bhaiya,Is python...