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 tagged time-complexity
1
vote
2
answers
241
Gate Applied Practice Test
Question--> The time required to find the 99th smallest element from a min heap of n elements is (given that we have access to the array elements)
lalitver10
asked
in
Programming in C
Jan 13, 2022
by
lalitver10
1.1k
views
binary-heap
data-structures
heap-sort
time-complexity
0
votes
1
answer
242
Algorithms | Made Easy Full Syllabus Test
Consider two arrays A and B which are integer types. Array A has n distinct values in it and array B also has n distinct values in it, but A and B can share some values. What is the worst-case running time to compute A - ... complexity O(n). However, the given solution is : Is it always assumed that the algorithm should work without any auxiliary space?
palashbehra5
asked
in
Algorithms
Jan 12, 2022
by
palashbehra5
412
views
made-easy-test-series
time-complexity
0
votes
2
answers
243
Made Easy Test Series
Which of the following can be the best algorithm(s) for all pair of the shortest path problem? I. ‘V’ invocations of Dijkstra algorithm ⇒ Ο(VE logV). II. ‘V’ invocations of Bellman-Ford algorithm ⇒ Ο(V2 E). III. ‘1’ invocations of Floyd-Warshall algorithm ⇒ Ο(V3).
LRU
asked
in
Algorithms
Jan 8, 2022
by
LRU
374
views
made-easy-test-series
shortest-path
time-complexity
1
vote
1
answer
244
Self doubts
T(n)=T(n/5)+T(7n/10)+an a: constant what will be the time complexity of the above recurrence relation?? Please share the approach for this kind of recurrence relation
lalitver10
asked
in
Algorithms
Jan 4, 2022
by
lalitver10
598
views
algorithms
recurrence-relation
time-complexity
divide-and-conquer
0
votes
1
answer
245
#Made Easy Test Series
Find the time complexity of the given program
Nitesh_Yadav
asked
in
Algorithms
Jan 4, 2022
by
Nitesh_Yadav
490
views
made-easy-test-series
algorithms
time-complexity
2
votes
1
answer
246
#self doubt
how to solve this?
samarpita
asked
in
Algorithms
Dec 29, 2021
by
samarpita
653
views
time-complexity
algorithms
1
vote
1
answer
247
NPTEL Assignment Question
What is the complexity of inorder traversal for a binary search tree with n nodes? O(log n) whether the tree is balanced or unbalanced. O(log n) if the tree is balanced, O(n) otherwise. O(n) whether the tree is balanced or unbalanced. O(n) if the tree is balanced, O(n log n) otherwise.
rsansiya111
asked
in
DS
Dec 8, 2021
by
rsansiya111
597
views
data-structures
nptel-quiz
binary-search-tree
time-complexity
2
votes
1
answer
248
NPTEL Assignment Question
Suppose we do merge sort with a three-way split: divide the array into 3 equal parts, sort each part and do a 3 way merge. What would the worst-case complexity of this version be? O($n^2$) O($n^2$ log3n) O(n log2n) O(n $(log2n)^2$)
rsansiya111
asked
in
Algorithms
Dec 8, 2021
by
rsansiya111
843
views
nptel-quiz
merge-sort
time-complexity
0
votes
1
answer
249
NPTEL Assignment Question
Suppose we want to extend the union-find data structure to support the operation Reset(c), which takes as input the name of a component c and then breaks up c into singleton components, like MakeUnionFind(). For instance if c = 3 and c currently ... representation: O(n), Pointer representation: O(size(c)) Array representation: O(size(c)), Pointer representation: O(size(c))
rsansiya111
asked
in
Algorithms
Dec 8, 2021
by
rsansiya111
1.3k
views
algorithms
array
time-complexity
nptel-quiz
0
votes
3
answers
250
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)
rsansiya111
asked
in
Algorithms
Dec 8, 2021
by
rsansiya111
722
views
algorithms
nptel-quiz
sorting
time-complexity
0
votes
1
answer
251
NPTEL Assignment Question
. You are given a set of n points on the number line. They are given in arbitrary order. The task is to find the points that are closest to each other. To solve the problem you decide to take one point and compute its distance to all other points and repeat ... closest pair. What is the running time of this algorithm ? O(nlgn) O(n^2) Runtime is independent of n. O(log n)
rsansiya111
asked
in
Algorithms
Dec 8, 2021
by
rsansiya111
7.5k
views
nptel-quiz
time-complexity
0
votes
1
answer
252
NPTEL Assignment Question
rsansiya111
asked
in
Algorithms
Dec 7, 2021
by
rsansiya111
304
views
nptel-quiz
bellman-ford
time-complexity
0
votes
0
answers
253
NIELIT STA 2021
The time complexity of solving the Longest Common Subsequence problem using Dynamic Programming is: (m and n are lengths of subsequences) O(m.n) O(m+n) O(log m.n) O(m/n)
rsansiya111
asked
in
Algorithms
Dec 6, 2021
by
rsansiya111
310
views
algorithms
time-complexity
0
votes
1
answer
254
#timecomplexity
We are having 4 sorted sub-lists of size n/4, What is the time complexity to merge them in a single sorted list?
Crackca
asked
in
Algorithms
Nov 20, 2021
by
Crackca
313
views
time-complexity
algorithms
3
votes
1
answer
255
Applied Gate Test Series
Consider the function given below ? Assume T(0) = 0 int fun( int n ) { if ( n <= 0 ) return 0; int i = random( n - 1 ); return fun(i) + fun(n - i - 1); } random(n) returns an integer in the range [0, n] in constant time What is the time complexity of the above function? $\Theta (n^{2})$ $\Theta (n)$ $\Theta (n\log n)$ None
Aashay kaurav
asked
in
Algorithms
Nov 16, 2021
by
Aashay kaurav
520
views
time-complexity
algorithms
recursion
2
votes
1
answer
256
Applied Test Series
The time required to determine the minimum element from the max heap of size O(log(n)) is given by
LRU
asked
in
DS
Nov 3, 2021
by
LRU
827
views
data-structures
binary-heap
time-complexity
applied-gate-test-series
1
vote
1
answer
257
Applied Test Series
What is the correct order ?
LRU
asked
in
Algorithms
Nov 2, 2021
by
LRU
386
views
algorithms
time-complexity
applied-gate-test-series
2
votes
2
answers
258
Applied Test Series
Consider an array contains n integers, each integer belongs to {0, 1, 2}. What is the best case time complexity to sort an array?
LRU
asked
in
Algorithms
Oct 15, 2021
by
LRU
642
views
test-series
algorithms
time-complexity
array
0
votes
2
answers
259
Sorting(Algorithms)
The complexity of comparison based sorting algorithm is (nlogn) .How?
_Madhuri
asked
in
Algorithms
Oct 9, 2021
by
_Madhuri
646
views
algorithms
time-complexity
sorting
1
vote
1
answer
260
Applied gate demo test
Consider the following function int foo(int n) { int p = 1 ; if (n && !(n&(n-1))) return n; while (p<n) { p <<= 1; } return p; } What is the worst case time complexity of function foo(n)
devilstephen7
asked
in
Algorithms
Sep 20, 2021
by
devilstephen7
511
views
time-complexity
applied-gate-test-series
0
votes
0
answers
261
#algorithms #databases
What is the worst-case time complexity to find attribute closure of a set of elements? i.e. Let find attribute closure for {AB}+ R(A,B,C,D,E,F,G,H,I,….. up to k time) { A → BC B → DE D → F F → GHI . . . and so on up to k functional dependencies... } My answer is O(k^k). Please verify someone.
Crackca
asked
in
Algorithms
Sep 6, 2021
by
Crackca
152
views
algorithms
time-complexity
2
votes
1
answer
262
TIFR CSE 2021 | Part B | Question: 15
Let $A\left [ i \right ] : i=0, 1, 2, \dots , n-1$ be an array of $n$ distinct integers. We wish to sort $A$ in ascending order. We are given that each element in the array is at a position that is at most $k$ away from its position in the sorted array, ... $t\left ( n \right ) = \Theta \left ( nk \right )$
soujanyareddy13
asked
in
Algorithms
Mar 25, 2021
by
soujanyareddy13
767
views
tifr2021
algorithms
sorting
time-complexity
14
votes
4
answers
263
GATE CSE 2021 Set 2 | Question: 2
Let $H$ be a binary min-heap consisting of $n$ elements implemented as an array. What is the worst case time complexity of an optimal algorithm to find the maximum element in $H$? $\Theta (1)$ $\Theta (\log n)$ $\Theta (n)$ $\Theta (n \log n)$
Arjun
asked
in
DS
Feb 18, 2021
by
Arjun
8.7k
views
gatecse-2021-set2
data-structures
binary-heap
time-complexity
1-mark
14
votes
4
answers
264
GATE CSE 2021 Set 2 | Question: 8
What is the worst-case number of arithmetic operations performed by recursive binary search on a sorted array of size $n$? $\Theta ( \sqrt{n})$ $\Theta (\log _2(n))$ $\Theta(n^2)$ $\Theta(n)$
Arjun
asked
in
Algorithms
Feb 18, 2021
by
Arjun
11.8k
views
gatecse-2021-set2
algorithms
binary-search
time-complexity
1-mark
18
votes
3
answers
265
GATE CSE 2021 Set 1 | Question: 10
A binary search tree $T$ contains $n$ distinct elements. What is the time complexity of picking an element in $T$ that is smaller than the maximum element in $T$? $\Theta(n\log n)$ $\Theta(n)$ $\Theta(\log n)$ $\Theta (1)$
Arjun
asked
in
DS
Feb 18, 2021
by
Arjun
11.5k
views
gatecse-2021-set1
data-structures
binary-search-tree
time-complexity
1-mark
24
votes
7
answers
266
GATE CSE 2021 Set 1 | Question: 30
Consider the following recurrence relation. $T\left ( n \right )=\left\{\begin{array} {lcl} T(n ∕ 2)+T(2n∕5)+7n & \text{if} \; n>0\\1 & \text{if}\; n=0 \end{array}\right.$ Which one of the following options is correct? $T(n)=\Theta (n^{5/2})$ $T(n)=\Theta (n\log n)$ $T(n)=\Theta (n)$ $T(n)=\Theta ((\log n)^{5/2})$
Arjun
asked
in
Algorithms
Feb 18, 2021
by
Arjun
23.7k
views
gatecse-2021-set1
algorithms
recurrence-relation
time-complexity
2-marks
Page:
« prev
1
...
4
5
6
7
8
9
10
11
12
13
14
...
53
next »
Subscribe to GATE CSE 2024 Test Series
Subscribe to GO Classes for GATE CSE 2024
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
Post GATE 2024 Guidance [Counseling tips and resources]
GATE CSE 2024 Result Responses
[Project Contest] Pytorch backend support for MLCommons Cpp Inference implementation
Participating in MLCommons Inference v4.0 submission (deadline is February 23 12pm IST)
IIITH PGEE 2024 Test Series by GO Classes
Subjects
All categories
General Aptitude
(3.5k)
Engineering Mathematics
(10.4k)
Digital Logic
(3.6k)
Programming and DS
(6.2k)
Algorithms
(4.8k)
Theory of Computation
(6.9k)
Compiler Design
(2.5k)
Operating System
(5.2k)
Databases
(4.8k)
CO and Architecture
(4.0k)
Computer Networks
(4.9k)
Artificial Intelligence
(79)
Machine Learning
(48)
Data Mining and Warehousing
(25)
Non GATE
(1.4k)
Others
(2.7k)
Admissions
(684)
Exam Queries
(1.6k)
Tier 1 Placement Questions
(17)
Job Queries
(80)
Projects
(11)
Unknown Category
(870)
64.3k
questions
77.9k
answers
244k
comments
80.0k
users
Recent questions tagged time-complexity
Recent Blog Comments
category ?
Hi @Arjun sir, I have obtained a score of 591 in ...
download here
Can you please tell about IIT-H mtech CSE self...
Please add your admission queries here:...