Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Webpage for Algorithms
Recent questions tagged algorithms
0
votes
2
answers
2461
Algorithm Time Complexity
Which of the following describes growth of f(x)? 1. Quadratic 2.Linear 3.Exponential 4.Logarithm
Which of the following describes growth of f(x)?1. Quadratic2.Linear3.Exponential4.Logarithm
rahul sharma 5
745
views
rahul sharma 5
asked
Dec 13, 2016
Algorithms
time-complexity
algorithms
+
–
0
votes
1
answer
2462
NOTATIONS(BIG O,BIG OMEGA,THETA)
santhoshdevulapally
691
views
santhoshdevulapally
asked
Dec 12, 2016
Algorithms
algorithms
asymptotic-notation
test-series
+
–
0
votes
1
answer
2463
Time Complexity
Consider the following function for(int n) { for(i = 1; i <= n; i = i*2) { for(j = 1; j <= i; j = j*2) printf(“GATE 2017”); } }
Consider the following function for(int n) { for(i = 1; i <= n; i = i*2) { for(j = 1; j <= i; j = j*2) printf(“GATE 2017”); } }
Anirban Biswas
3.8k
views
Anirban Biswas
asked
Dec 12, 2016
Algorithms
algorithms
time-complexity
+
–
0
votes
1
answer
2464
Time complexity
Let A =[a1, a2, …, an] be a one-dimensional array of integers define a MEGA-PEAK in A to be an element ai belongs A such that ai >= aj for all aj with | j – i | <= 2. What is the time complexity to find MEGA-PEAK?
Let A =[a1, a2, …, an] be a one-dimensional array of integers define a MEGA-PEAK in A to be an element ai belongs A such that ai >= aj for all aj with | j – i | <= 2....
Anirban Biswas
480
views
Anirban Biswas
asked
Dec 12, 2016
Algorithms
algorithms
time-complexity
+
–
0
votes
1
answer
2465
MadeEasy Test Series: Algorithms - Sorting
#plz check??
#plz check??
Hradesh patel
331
views
Hradesh patel
asked
Dec 12, 2016
Algorithms
made-easy-test-series
algorithms
sorting
numerical-answers
+
–
0
votes
0
answers
2466
MadeEasy Test Series: Algorithms - Dynamic Programming
#plz check??
#plz check??
Hradesh patel
242
views
Hradesh patel
asked
Dec 12, 2016
Algorithms
made-easy-test-series
algorithms
dynamic-programming
+
–
1
votes
1
answer
2467
MadeEasy Test Series: Algorithms - Time Complexity
#plz check??
#plz check??
Hradesh patel
727
views
Hradesh patel
asked
Dec 11, 2016
Algorithms
made-easy-test-series
algorithms
graph-algorithms
time-complexity
+
–
0
votes
1
answer
2468
Radix sort vs quick sort comparision
Can somebody explain following point from GeeksforGeeks,This same paragraph is also available in CLRS book. Is Radix Sort preferable to Comparison based sorting algorithms like Quick-Sort? If we have log2n bits for every digit, the running ... effectively. Also, Radix sort uses counting sort as a subroutine and counting sort takes extra space to sort numbers.
Can somebody explain following point from GeeksforGeeks,This same paragraph is also available in CLRS book.Is Radix Sort preferable to Comparison based sorting algorithms...
rahul sharma 5
1.3k
views
rahul sharma 5
asked
Dec 11, 2016
Algorithms
algorithms
sorting
+
–
0
votes
1
answer
2469
Asymptotic complexity
If f(n) = O(g(n)), is log(f(n)) = O(log(g(n))) ? I just learnt today that this relation does not hold, because log changes the behavior of the functions. But is it true? An example will be good. Any help is appreciated.
If f(n) = O(g(n)), is log(f(n)) = O(log(g(n))) ?I just learnt today that this relation does not hold, because log changes the behavior of the functions. But is it true? ...
roni95
531
views
roni95
asked
Dec 11, 2016
Algorithms
algorithms
asymptotic-notation
+
–
0
votes
1
answer
2470
comparison
Does insertion sort always better than selection sort?
Does insertion sort always better than selection sort?
vaishali jhalani
346
views
vaishali jhalani
asked
Dec 11, 2016
Algorithms
algorithms
sorting
+
–
1
votes
1
answer
2471
Algorithms [2 way merge]
Is 2 way merge behaves same as we do in merge sort?Dividing into groups of two from top to bottom or does it start from bottom to top by mergeing two elements at a time.?Please share example for understanding
Is 2 way merge behaves same as we do in merge sort?Dividing into groups of two from top to bottom or does it start from bottom to top by mergeing two elements at a time.?...
rahul sharma 5
1.1k
views
rahul sharma 5
asked
Dec 10, 2016
Algorithms
merge-sort
algorithms
+
–
14
votes
4
answers
2472
GATE CSE 1988 | Question: 1iii
Quicksort is ________ efficient than heapsort in the worst case.
Quicksort is ________ efficient than heapsort in the worst case.
go_editor
2.7k
views
go_editor
asked
Dec 10, 2016
Algorithms
gate1988
algorithms
sorting
fill-in-the-blanks
easy
+
–
9
votes
2
answers
2473
Max Heap
The number of ways , in which numbers 1,2,3,4,5 can be inserted into binary heap,such that resultant binary heap is max heap ? given ans :8
The number of ways , in which numbers 1,2,3,4,5 can be inserted into binary heap,such that resultant binary heap is max heap ?given ans :8
minal
4.0k
views
minal
asked
Dec 9, 2016
Programming in C
binary-heap
algorithms
+
–
1
votes
1
answer
2474
sorting
jenny101
538
views
jenny101
asked
Dec 9, 2016
Algorithms
sorting
algorithms
test-series
+
–
0
votes
1
answer
2475
TestBook Test Series: Algorithms - Time Complexity
how to solve these two using matser thorem. 1. t(n)=2t(√n)+n 2. t(n)=4t(√n)+(logn)^2
how to solve these two using matser thorem.1. t(n)=2t(√n)+n2. t(n)=4t(√n)+(logn)^2
rajan
350
views
rajan
asked
Dec 9, 2016
Algorithms
testbook-test-series
algorithms
time-complexity
master-theorem
+
–
0
votes
0
answers
2476
Algorithms [Euclid's Algorithm for GCD]
What is the best case and worst case time complexity for Euclid's algorithm?Let numbers be a and b As per my understanding Best case - If a and b are multiple :0(1). Worst case - Both are consecutive fibonicci number.Complexity?
What is the best case and worst case time complexity for Euclid's algorithm?Let numbers be a and bAs per my understandingBest case - If a and b are multiple :0(1).Worst c...
rahul sharma 5
701
views
rahul sharma 5
asked
Dec 8, 2016
Algorithms
algorithms
space-complexity
+
–
0
votes
0
answers
2477
Merge Sort - Miximum Input Size
Assume that a merge sort algorithm in worst case takes30s for an input of size 64. Which of the following closely approximate maximum input size of a problem that can be solved in 6min. 128 256 512 1024
Assume that a merge sort algorithm in worst case takes30s for an input of size 64. Which of the following closely approximate maximum input size of a problem that can be ...
pC
618
views
pC
asked
Dec 8, 2016
Algorithms
algorithms
merge-sort
time-complexity
+
–
0
votes
1
answer
2478
Solve The Recurrance
Solve the following Recurrence Equation using back substitution method T(n)= T(n-1)+log n
Solve the following Recurrence Equation using back substitution methodT(n)= T(n-1)+log n
PEKKA
7.0k
views
PEKKA
asked
Dec 6, 2016
Algorithms
algorithms
recurrence-relation
+
–
1
votes
0
answers
2479
Solve the recurrence using back substitution method
Solve the following Recurrence Equation using back substitution method T(n)= 2T(n/2)+log n
Solve the following Recurrence Equation using back substitution method T(n)= 2T(n/2)+log n
PEKKA
2.9k
views
PEKKA
asked
Dec 6, 2016
Algorithms
algorithms
time-complexity
+
–
0
votes
2
answers
2480
Calicut Gate Academy Test Series | DAA Time complexity Q2
Complexity of the following snippet is for (i=1;i<n;++i) for(j=1;j<=n;j=j+i) c=c+1;
Complexity of the following snippet is for (i=1;i<n;++i) for(j=1;j<=n;j=j+i) c=c+1;
PEKKA
433
views
PEKKA
asked
Dec 6, 2016
Algorithms
test-series
gate-academy-test-series
algorithms
time-complexity
+
–
1
votes
1
answer
2481
Calicut Gate Academy Test Series | DAA Find Complexity
Complexity of the below code snippet is .. for (i=1;i<=n;++i) { j=2; while(j<=n) { j=j*j; c=c+1; } } $O(nlog n)$ $O(n^{2})$ $O(nloglog n)$ $O(n)$
Complexity of the below code snippet is ..for (i=1;i<=n;++i) { j=2; while(j<=n) { j=j*j; c=c+1; } }$O(nlog n)$$O(n^{2})$$O(nloglog n)$$O(n)$
PEKKA
393
views
PEKKA
asked
Dec 6, 2016
Algorithms
test-series
gate-academy-test-series
algorithms
time-complexity
+
–
0
votes
0
answers
2482
cormen chapter 3
Consider the two functions (logn)k and nϵ, where k>1 and ϵ>0. The solution is (logn)k= O(nϵ). My doubt is that if we take ϵ as0.000000000000000000000000000000.......000000000001 that is very small wont this result be wrong?? Can someone check?
Consider the two functions (logn)k and nϵ, where k>1 and ϵ>0. The solution is (logn)k= O(nϵ). My doubt is that if we take ϵ as0.000000000000000000000000000000.........
sushmita
428
views
sushmita
asked
Dec 6, 2016
Algorithms
algorithms
+
–
1
votes
0
answers
2483
MadeEasy Test Series: Algorithms - Minimum Spanning Trees
adding a constant to graph edges doesnt change the edges that belong to minimum spanning tree of the graph ryt?
adding a constant to graph edges doesnt change the edges that belong to minimum spanning tree of the graph ryt?
Anusha Motamarri
355
views
Anusha Motamarri
asked
Dec 5, 2016
Algorithms
made-easy-test-series
algorithms
minimum-spanning-tree
+
–
0
votes
2
answers
2484
MadeEasy Test Series: Algorithms - Asymptotic Notations
what if i take f(x) = sinx, g(x)= cosx? these two cant be compared. sinx cant be written as O(cosx) and also cosx cant be written as O(sinx) then B becomes invalid. plz verify
what if i take f(x) = sinx,g(x)= cosx?these two cant be compared.sinx cant be written as O(cosx) and also cosx cant be written as O(sinx)then B becomes invalid.plz verify...
Anusha Motamarri
1.5k
views
Anusha Motamarri
asked
Dec 5, 2016
Algorithms
made-easy-test-series
algorithms
asymptotic-notation
+
–
0
votes
1
answer
2485
Asymptotic Notations DAA
$f(x) = n^{log (n)}$ $g(x) = nlog (n)$ $h(x) = 2^{n}$ Arrange Them in Increasing Order of rate of growth
$f(x) = n^{log (n)}$ $g(x) = nlog (n)$ $h(x) = 2^{n}$Arrange Them in Increasing Order of rate of growth
PEKKA
334
views
PEKKA
asked
Dec 5, 2016
Algorithms
asymptotic-notation
algorithms
+
–
1
votes
1
answer
2486
Time Complexity
Samujjal Das
1.0k
views
Samujjal Das
asked
Dec 4, 2016
Algorithms
algorithms
time-complexity
test-series
+
–
2
votes
2
answers
2487
Made-easy
$T(N) = 2T\sqrt{N} + Log\sqrt{N}$ what is the solution of recurrence relation
$T(N) = 2T\sqrt{N} + Log\sqrt{N}$what is the solution of recurrence relation
Aboveallplayer
458
views
Aboveallplayer
asked
Dec 4, 2016
Algorithms
algorithms
recurrence-relation
made-easy-test-series
+
–
1
votes
2
answers
2488
Find the time complexity of given loops
for (int i = 1; i <=m; i += c) { ---do something ---} for (int i = 1; i <=n; i += c) { ---do something --- } What will the the tiem complexity of given code pseudococde? A. O (max(m,n)) B. O(min(m,n)) C. O( m+n) D. O(mn)
for (int i = 1; i <=m; i += c){ -do something -}for (int i = 1; i <=n; i += c){ -do something - }What will the the tiem complexity of given code pseudococde?A. O (m...
sh!va
929
views
sh!va
asked
Dec 4, 2016
Algorithms
algorithms
time-complexity
+
–
0
votes
1
answer
2489
Solve using Masters theorem
Solve given recurrence relation using Masters theorem: T(n) =T (n/2)+ n
Solve given recurrence relation using Masters theorem:T(n) =T (n/2)+ n
sh!va
388
views
sh!va
asked
Dec 4, 2016
Algorithms
recurrence-relation
algorithms
master-theorem
+
–
0
votes
1
answer
2490
[Strong/Weak Semaphore] Operating system Chapter -5 William Stallings 7th Edition
How the processes are removed from the Semaphore suspended queue?Is it implementation dependent or is it FIFO always?If not FIFO then how starvation will be handled.I got this doubt while reading following ... Priority based/SJf..etc ,then it will neither be strong semaphore nor weak semaphore?# Please clarify
How the processes are removed from the Semaphore suspended queue?Is it implementation dependent or is it FIFO always?If not FIFO then how starvation will be handled.I got...
rahul sharma 5
3.3k
views
rahul sharma 5
asked
Dec 4, 2016
Operating System
operating-system
process-synchronization
algorithms
semaphore
+
–
Page:
« prev
1
...
78
79
80
81
82
83
84
85
86
87
88
...
118
next »
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register