Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Webpage for Algorithms
Recent questions tagged algorithms
0
votes
1
answer
1801
MadeEasy Workbook: Algorithms - Graph Algorithms
aaru14
585
views
aaru14
asked
Dec 1, 2017
Algorithms
algorithms
graph-algorithms
made-easy-booklet
+
–
0
votes
1
answer
1802
MadeEasy Subject Test: Algorithms - Graph Algorithms
complexity of kruskal algorithum for finding the minimum cost spanning tree of an undirected graph contain n vertices and m edges if the edge are already sorted.??
complexity of kruskal algorithum for finding the minimum cost spanning tree of an undirected graph contain n vertices and m edges if the edge are already sorted.??
aaru14
333
views
aaru14
asked
Nov 30, 2017
Algorithms
made-easy-test-series
algorithms
graph-algorithms
+
–
1
votes
3
answers
1803
[Algorithms] Heap sort
Merging k sorted lists of size n/k into one sorted list of n-elements using heap sort will take how much time ? My doubt First approach:- here it is mentioned heap sort so, heap sort will always take nlogn.and here also we have n elements and it will ... give o(k)+(logk)*(n/k) I think answer should be nlogn only because the second approach is not heap sort. Please check.
Merging k sorted lists of size n/k into one sorted list of n-elements using heap sort will take how much time ?My doubtFirst approach:- here it is mentioned heap sort so,...
rahul sharma 5
1.1k
views
rahul sharma 5
asked
Nov 27, 2017
Algorithms
algorithms
heap-sort
time-complexity
+
–
4
votes
1
answer
1804
MadeEasy Subject Test: Algorithms - Sorting
Consider the following statements: S1 : On any random input insertion sort is work more efficiently than bubble sort. S2 : Average number of comparison of insertion sort is better than bubble sort by constant factor. If efficiency, is considered as number of comparison to sort an array [input], then which of the above statement is correct?
Consider the following statements:S1 : On any random input insertion sort is work more efficiently than bubble sort.S2 : Average number of comparison of insertion sort ...
charul
1.9k
views
charul
asked
Nov 27, 2017
Algorithms
made-easy-test-series
algorithms
sorting
+
–
0
votes
0
answers
1805
madeeasy class notes
https://gateoverflow.in/?qa=blob&qa_blobid=15895383759487537860 find complexity ?? where n is prime. someone plz explain??
https://gateoverflow.in/?qa=blob&qa_blobid=15895383759487537860find complexity ??where n is prime.someone plz explain??
aaru14
301
views
aaru14
asked
Nov 27, 2017
Algorithms
algorithms
+
–
0
votes
0
answers
1806
Doubt in this question
https://gateoverflow.in/8398/gate2015-3-4 here it will be [n (n-1)/2]^2 ie; n^2 (n-1)^2/4 => n^2(n^2 -2n+1^2)/4 => n^4 -2n^3+n^2 for bigh oh consider highest power term therfore O(n^4) also θ(n^4) With this (a) θ(n^4) is valid (d) Ω(n^3) valid But how come option 2 is valid
https://gateoverflow.in/8398/gate2015-3-4here it will be[n (n-1)/2]^2 ie; n^2 (n-1)^2/4= n^2(n^2 -2n+1^2)/4= n^4 -2n^3+n^2for bigh oh consider highest power term therfore...
aka 53
395
views
aka 53
asked
Nov 27, 2017
Algorithms
algorithms
+
–
1
votes
3
answers
1807
Matrix chain multiplication
Which of the following is the recurrence relation for the matrix chain multiplication problem where p[i-1]*p[i] gives the dimension of the i^th matrix? dp[i,j]=1 if i=j dp[i,j]=min{dp[i,k]+dp[k+1,j]} dp[i,j]=1 if i=j dp[i,j]=min{dp[i,k]+dp[k+1,j]}+p[i-1]*p[k]*p[j] dp[i,j]= ... dp[i,j]=min{dp[i,k]+dp[k+1,j]} dp[i,j]=0 if i=j dp[i,j]=min{dp[i,k]+dp[k+1,j]}+p[i-1]*p[k]*p[j]
Which of the following is the recurrence relation for the matrix chain multiplication problem where p[i-1]*p[i] gives the dimension of the i^th matrix? dp[i,j]=1 if i=jd...
Parshu gate
4.3k
views
Parshu gate
asked
Nov 27, 2017
Algorithms
dynamic-programming
algorithms
matrix-chain-ordering
+
–
0
votes
1
answer
1808
The Infiniteness Problem
what is the Infiniteness Problem?
what is the Infiniteness Problem?
Mk Utkarsh
852
views
Mk Utkarsh
asked
Nov 27, 2017
Theory of Computation
theory-of-computation
algorithms
decidability
+
–
2
votes
2
answers
1809
Doubt Algorithms Gate 2003
2^2n =O(2^n) True or False Its false but why
2^2n =O(2^n) True or FalseIts false but why
aka 53
623
views
aka 53
asked
Nov 26, 2017
Algorithms
algorithms
asymptotic-notation
+
–
0
votes
1
answer
1810
Breadth first Search
VS
1.0k
views
VS
asked
Nov 26, 2017
Algorithms
algorithms
breadth-first-search
graph-algorithms
numerical-answers
test-series
+
–
0
votes
0
answers
1811
Doubt Algorithms
I wanted to know how θ is derived for a problem. Can we write it directly Example n^4 + n^3+ n^2 Here worst case will be n^4 since it is the term with highest power(worst). Similarly can i get θ
I wanted to know how θ is derived for a problem. Can we write it directly Example n^4 + n^3+ n^2 Here worst case will be n^4 since it is the term with highest power(wors...
aka 53
344
views
aka 53
asked
Nov 25, 2017
Algorithms
algorithms
time-complexity
asymptotic-notation
+
–
1
votes
0
answers
1812
linked list
Let P be a single linked list.Let Q be a pointer to an intermediate node 'X' in the list.What is the worst case time complexity of best known algorithm to delete the node 'X ' from the list
Let P be a single linked list.Let Q be a pointer to an intermediate node 'X' in the list.What is the worst case time complexity of best known algorithm to delete the node...
saipriyab
1.4k
views
saipriyab
asked
Nov 25, 2017
Programming in C
linked-list
algorithms
data-structures
+
–
1
votes
1
answer
1813
Algorithms recurrence relation
Base condition T(n) = 1 Otherwise T(n) = T(n-1) +n Then After solving i got to this step ...how should i generalize now T(n) = T( n-k) + n-(k-1) + n-(k-2)+n
Base condition T(n) = 1Otherwise T(n) = T(n-1) +n Then After solving i got to this step ...how should i generalize nowT(n) = T( n-k) + n-(k-1) + n-(k-2)+n
aka 53
330
views
aka 53
asked
Nov 25, 2017
Algorithms
algorithms
recurrence-relation
+
–
3
votes
1
answer
1814
Previous Year Gate Question Doubt
From CLRS the complexity of radix sort is theta(d(n+k)) where d is # of digits , k is range and n is numbers . So how option C is right . Plz solve it on the basis of mine given complexity .
From CLRS the complexity of radix sort is theta(d(n+k)) where d is # of digits , k is range and n is numbers . So how option C is right . Plz solve it on the basis of min...
hem chandra joshi
322
views
hem chandra joshi
asked
Nov 25, 2017
Algorithms
algorithms
radix-sort
time-complexity
+
–
1
votes
2
answers
1815
Regarding prims algo
Hello, I have doubt regarding prims algorithm 1)should we choose the lowest cost edge and then implement algo further? 2)Or we choose any vertex and then lowest cost edge of that vertex?
Hello,I have doubt regarding prims algorithm1)should we choose the lowest cost edge and then implement algo further?2)Or we choose any vertex and then lowest cost edge of...
JPranavc
538
views
JPranavc
asked
Nov 24, 2017
DS
algorithms
prims-algorithm
+
–
3
votes
0
answers
1816
MadeEasy Subject Test: Algorithms - Time Complexity
https://gateoverflow.in/?qa=blob&qa_blobid=6856287731579574233 someone plz tell ??
https://gateoverflow.in/?qa=blob&qa_blobid=6856287731579574233someone plz tell ??
aaru14
480
views
aaru14
asked
Nov 23, 2017
Algorithms
made-easy-test-series
algorithms
time-complexity
+
–
1
votes
1
answer
1817
Internet
for ( i= 1; i<=n; i++) for(j=n/3: j<=2n; j=j+n/3) sum =sum+1; What will be O and θ for this
for ( i= 1; i<=n; i++) for(j=n/3: j<=2n; j=j+n/3) sum =sum+1;What will be O and θ for this
aka 53
387
views
aka 53
asked
Nov 23, 2017
Algorithms
algorithms
asymptotic-notation
+
–
4
votes
1
answer
1818
Ace Test Series: Algorithms - Searching
saxena0612
1.6k
views
saxena0612
asked
Nov 23, 2017
Algorithms
binary-search
algorithms
ace-test-series
recurrence-relation
+
–
0
votes
0
answers
1819
Question on Inversion and sorting
The average number of inversions in an unsorted array of n elements is? (Two elements a[i] and a[j] form an inversion if a[i] > a[j] and i < j) A.) n(n-1)/2 B.) n(n-1)/4 C.) n(n+1)/2 D.) n!/2
The average number of inversions in an unsorted array of n elements is?(Two elements a[i] and a[j] form an inversion if a[i] a[j] and i < j)A.) n(n-1)/2B.) n(n-1)/4C.) n...
Akash Mishra
751
views
Akash Mishra
asked
Nov 22, 2017
Algorithms
algorithms
sorting
+
–
7
votes
2
answers
1820
Question on sorted array and time complexity
Which of the following operations can be performed in O(log n) time or faster on a sorted array A? (n denotes the size of array) 1) Search(A, x) 2) Find-Minimum(A) 3) Delete(A, x) Choose the correct option: A.) 1 & 3 B.) 1 & 2 C.) 2 & 3 D.) All of them I chose option B but the book says option D is right. Please provide an explanation.
Which of the following operations can be performed in O(log n) time or faster on a sorted array A? (n denotes the size of array)1) Search(A, x)2) Find-Minimum(A)3) Delete...
Akash Mishra
4.6k
views
Akash Mishra
asked
Nov 22, 2017
Algorithms
algorithms
sorting
time-complexity
binary-search
+
–
2
votes
1
answer
1821
#TestBook
Suppose in an array A[] , we exchange elements A[i] and A[i+k] , which were originally out of order A) at least 1 and at most 2k-1 inversions are removed B) at least 2 and at most 2k inversions are removed C)at least 0 and at most k inversions are removed D) none
Suppose in an array A[] , we exchange elements A[i] and A[i+k] , which were originally out of orderA) at least 1 and at most 2k-1 inversions are removedB) at least 2 and ...
Raj_Choudhary
636
views
Raj_Choudhary
asked
Nov 22, 2017
Algorithms
algorithms
sorting
testbook-test-series
+
–
0
votes
1
answer
1822
Time complexity for below Code
i = n; While(i > 0) { i= i/2; }
i = n;While(i 0){ i= i/2;}
aka 53
277
views
aka 53
asked
Nov 22, 2017
Algorithms
time-complexity
algorithms
+
–
2
votes
1
answer
1823
Time Complexity of the following code
for i <--- 1 to n for j <---- 1 to n/2 X = X + 1 (i and j both are incrementing by 1) Outer runs for n times and inner for n/2 So will it be n(n/2) => O(n^2) times...
for i < - 1 to n for j < 1 to n/2 X = X + 1(i and j both are incrementing by 1)Outer runs for n times and inner for n/2 So will it be n(n...
aka 53
995
views
aka 53
asked
Nov 22, 2017
Algorithms
time-complexity
algorithms
asymptotic-notation
+
–
0
votes
0
answers
1824
Master theorem
T(n) = T(n-1) + n In which case it falls ??
T(n) = T(n-1) + nIn which case it falls ??
aka 53
364
views
aka 53
asked
Nov 22, 2017
Algorithms
algorithms
time-complexity
master-theorem
+
–
0
votes
1
answer
1825
Algo Recurrence Relation using Bck Substitution
T(n) = 4T(n/2) + C ......where C Constant T(n) = 16T(n/4) + 5C Cant figure out how to generalize and compare with base condition T(n) = 1 from above step.
T(n) = 4T(n/2) + C ......where C ConstantT(n) = 16T(n/4) + 5CCant figure out how to generalize and compare with base condition T(n) = 1 from above step.
aka 53
1.6k
views
aka 53
asked
Nov 21, 2017
Algorithms
algorithms
recurrence-relation
+
–
1
votes
0
answers
1826
What will be the Complexity for the recurrence relation
T(n) = 2T(n/2) + log n By substitution T(n) = 4T(n/4) + 2log n/2 + logn I got stucked here
T(n) = 2T(n/2) + log nBy substitution T(n) = 4T(n/4) + 2log n/2 + lognI got stucked here
aka 53
2.6k
views
aka 53
asked
Nov 21, 2017
Algorithms
time-complexity
algorithms
+
–
0
votes
0
answers
1827
time complexity
please explain the answer in detail
please explain the answer in detail
nikkey123
505
views
nikkey123
asked
Nov 21, 2017
Algorithms
time-complexity
algorithms
asymptotic-notation
+
–
2
votes
1
answer
1828
Search, Insert and Delete in Multiway search Trees
Hi Guys, What is the time complexity of Insert, Search and Delete operation in Multiway Trees (mainly B-tree and B+ Tree) ?
Hi Guys,What is the time complexity of Insert, Search and Delete operation in Multiway Trees (mainly B-tree and B+ Tree) ?
Chhotu
425
views
Chhotu
asked
Nov 20, 2017
DS
algorithms
data-structures
+
–
2
votes
3
answers
1829
Sorting
Two unsorted arrays of size m and n are to be sorted into a single array, what is best case time complexity?
Two unsorted arrays of size m and n are to be sorted into a single array, what is best case time complexity?
Pradatt Sharma
956
views
Pradatt Sharma
asked
Nov 20, 2017
Algorithms
algorithms
sorting
time-complexity
+
–
1
votes
0
answers
1830
Data structure and algorithms by Weiss Mark Allen
Suppose T1(N) = O(f(N)) and T2(N) =O(f(N)). Which of the following are true? a) T1(N) + T2(N) = O(f(N)) b) T1(N) - T2(N) = o(f(N)) c) T1(N)/T2(N) = O(1) d) T1(N) = O(T2(N)) My solution: a) true. let f1=n^2 and f2= ... and f2 same as before. Then f1/f2=n ==> O(n). d) false. take f1 and f2 same as before. Then T1(n) = ω(T2(n)) Am i doing it right ?
Suppose T1(N) = O(f(N)) and T2(N) =O(f(N)). Which of the following are true?a) T1(N) + T2(N) = O(f(N))b) T1(N) - T2(N) = o(f(N))c) T1(N)/T2(N) = O(1)d) T1(N) = O(T2(N))My...
♥_Less
335
views
♥_Less
asked
Nov 20, 2017
Algorithms
data-structures
algorithms
+
–
Page:
« prev
1
...
56
57
58
59
60
61
62
63
64
65
66
...
118
next »
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register