Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Webpage for Algorithms
Recent questions tagged algorithms
1
votes
1
answer
1201
Insertion Sort
Consider following Statements : S1 : On any random input insertion Sort works more efficiently then Bubble Sort. S2 : Average number of Comparison of Insertion Sort is better then bubble sort by a constant Factor. If efficiency is considered as number of comparisons to sort an Input Array Which of Following is Correct ? A. Only S1 B. Only S2 C. Both S1 and S2 D. None
Consider following Statements :S1 : On any random input insertion Sort works more efficiently then Bubble Sort.S2 : Average number of Comparison of Insertion Sort is bett...
Na462
1.5k
views
Na462
asked
Oct 20, 2018
Algorithms
algorithms
sorting
+
–
1
votes
1
answer
1202
MadeEasy Test Series: Algorithms - Time Complexity
Consider you are playing game of shooting balloon and you are expected to shoot n balloons in the board. If you are a sharp shooter(100% accuracy) and for every two balloons you are able to shoot, one new balloon is inserted into the board, then what is the time ... procedure if the board has to be emptied? (a) O(1) (b) O(n) (c) O(logn) (d) O(n2)
Consider you are playing game of shooting balloon and you are expected to shoot n balloons in the board. If you are a sharp shooter(100% accuracy) and for every two ballo...
Somoshree Datta 5
1.8k
views
Somoshree Datta 5
asked
Oct 20, 2018
Algorithms
algorithms
time-complexity
made-easy-test-series
+
–
0
votes
2
answers
1203
MadeEasy Test Series: Algorithms - Sorting
Consider the following scenario during insertion sort when the array looks like the following: {25,75,95,125,80,5,10} The number of comparisons that it will further take for the array to be completely sorted are______?
Consider the following scenario during insertion sort when the array looks like the following:{25,75,95,125,80,5,10}The number of comparisons that it will further take fo...
Somoshree Datta 5
1.6k
views
Somoshree Datta 5
asked
Oct 20, 2018
Algorithms
algorithms
sorting
made-easy-test-series
+
–
0
votes
1
answer
1204
Quick Sort
In Quicksort let n/7 th smallest element is chosen using an O(n2 ) algorithm as the pivot. Calculate the worst case time complexity of the algorithm.
In Quicksort let n/7 th smallest element is chosen using an O(n2 ) algorithm as thepivot. Calculate the worst case time complexity of the algorithm.
Purvi Agrawal
3.7k
views
Purvi Agrawal
asked
Oct 13, 2018
Algorithms
quick-sort
algorithms
time-complexity
recurrence-relation
+
–
0
votes
1
answer
1205
Algorithms
Minimum no of comparisons required to find the minimum and maximum of n distinct elements
Minimum no of comparisons required to find the minimum and maximum of n distinct elements
Raghav Khajuria
323
views
Raghav Khajuria
asked
Oct 13, 2018
Algorithms
algorithms
numerical-answers
normal
maximum-minimum
+
–
0
votes
1
answer
1206
Prim Algorithm
What is the time complexity of Prim algorithm without using min heap?
What is the time complexity of Prim algorithm without using min heap?
Alakhator
1.1k
views
Alakhator
asked
Oct 11, 2018
Algorithms
algorithms
graph-algorithm
prims-algorithm
time-complexity
+
–
0
votes
3
answers
1207
Find total number of comparisons needed
What is the total number of comparisons needed in the best case to find minimum and maximum of $300 $ elements?
What is the total number of comparisons needed in the best case to find minimum and maximum of $300 $ elements?
pankaj_vir
1.2k
views
pankaj_vir
asked
Oct 10, 2018
Algorithms
algorithms
normal
sorting
+
–
1
votes
0
answers
1208
radix sort counting sort
Given an array where numbers are in range from 1 to n6, which sorting algorithm can be used to sort these number in linear time? 1)Counting Sort 2)Radix Sort 3)Bubble Sort 4)Merge Sort.
Given an array where numbers are in range from 1 to n6, which sorting algorithm can be used to sort these number in linear time?1)Counting Sort2)Radix Sort3)Bubble Sort4)...
Kaushal Sanadhya
3.9k
views
Kaushal Sanadhya
asked
Oct 9, 2018
Algorithms
algorithms
sorting
time-complexity
+
–
3
votes
1
answer
1209
Merge sort
How many swaps are performed in Merge sort algorithm in worst case?
How many swaps are performed in Merge sort algorithm in worst case?
Kaushal Sanadhya
1.7k
views
Kaushal Sanadhya
asked
Oct 9, 2018
Algorithms
merge-sort
algorithms
sorting
merging
+
–
3
votes
1
answer
1210
ace test 4
ans given is option A
ans given is option A
Daniyal89
956
views
Daniyal89
asked
Oct 8, 2018
Algorithms
ace-test-series
algorithms
time-complexity
+
–
0
votes
3
answers
1211
Merge Sort Doubt
what is the recurrence relation for merge sort?
what is the recurrence relation for merge sort?
aditi19
1.1k
views
aditi19
asked
Oct 6, 2018
Algorithms
merge-sort
algorithms
time-complexity
recurrence-relation
sorting
divide-and-conquer
+
–
0
votes
0
answers
1212
Self-doubt - Case of Deletion when Open Addressing is used for collision resolution
In case of Open Addressing, when a key is deleted, a tombstone marker(delete marker) is inserted at its place. So if the hash table contains a lot of markers then it degrades the performance to a great extent ... DOUBT is - When the hash table contains a lot of tombstone markers, will it increases the load factor?
In case of Open Addressing, when a key is deleted, a tombstone marker(delete marker) is inserted at its place.So if the hash table contains a lot of markers then it degra...
Soumya29
571
views
Soumya29
asked
Oct 5, 2018
Algorithms
hashing
algorithms
+
–
0
votes
0
answers
1213
Self Doubt
What would be the worst case time complexity of an unreachable code? Let's say there are two parts to the code, where first part is if (0) with complexity O(n) and the else part with O(1). Something like this: if (0) { Time ... or we deduce it logically? Is there any resource to support this? How is time complexity calculated for unreachable code? Thanks Registered user 48
What would be the worst case time complexity of an unreachable code?Let's say there are two parts to the code, where first part is if (0) with complexity O(n) and the els...
Registered user 48
362
views
Registered user 48
asked
Oct 4, 2018
Algorithms
algorithms
self-doubt
programming
+
–
5
votes
3
answers
1214
recurrence relation MIT
$T(n)=\sqrt{n} T(\sqrt{n})+100n$ Please solve this.
$T(n)=\sqrt{n} T(\sqrt{n})+100n$Please solve this.
sushmita
2.1k
views
sushmita
asked
Oct 4, 2018
Algorithms
recurrence-relation
algorithms
time-complexity
discrete-mathematics
+
–
2
votes
0
answers
1215
#self doubt #greedy method #testseries
Consider the multistage graph with 6 stages then what is the minimum cost from Source node (A) to Destination node (N) using Greedy Method ______
Consider the multistage graph with 6 stages then what is the minimum cost from Source node (A) to Destination node (N) using Greedy Method ______
meghna
489
views
meghna
asked
Oct 3, 2018
Algorithms
algorithms
mst-greedy
+
–
0
votes
1
answer
1216
#self doubt #minimum spanning tree
T/F In a graph G=(V,E) suppose that each edge e ∊ E has an integer weight w(e) such that 1<= W(e) <=n Then there is a an o(mlogn) time algorithm to find a minimum spanning tree in G. Also,Does this "weight w(e) such that 1<= W(e) <=n" has significance on time complexity or we consider it as some edges weights and proceed?
T/FIn a graph G=(V,E) suppose that each edge e ∊ E has an integer weight w(e) such that 1<= W(e) <=n Then there is a an o(mlogn) time algorithm to find a minimum spann...
meghna
343
views
meghna
asked
Oct 3, 2018
Algorithms
minimum-spanning-tree
algorithms
+
–
0
votes
2
answers
1217
Prove that for any constant c > 0, (log n)^c = o(n).
Ojamajo Conan
451
views
Ojamajo Conan
asked
Oct 3, 2018
Algorithms
algorithms
time-complexity
+
–
1
votes
1
answer
1218
MadeEasy Test Series: Algorithms - Asymptotic Notations
mitesh kumar
435
views
mitesh kumar
asked
Oct 2, 2018
Algorithms
algorithms
asymptotic-notation
made-easy-test-series
+
–
0
votes
1
answer
1219
ACE TEST SERIES QUESTION
Shankar Kakde
288
views
Shankar Kakde
asked
Oct 1, 2018
Algorithms
algorithms
time-complexity
ace-test-series
+
–
1
votes
1
answer
1220
ACE TEST SERIES QUESTION
Shankar Kakde
335
views
Shankar Kakde
asked
Oct 1, 2018
Algorithms
knapsack-problem
algorithms
ace-test-series
+
–
0
votes
1
answer
1221
ACE algo test series
Ans given is option-B
Ans given is option-B
Daniyal89
693
views
Daniyal89
asked
Sep 30, 2018
Algorithms
sorting
space-complexity
algorithms
ace-test-series
+
–
0
votes
0
answers
1222
Self doubt
"FIFO sometimes can support stack property" And sometimes not and so,it will fall in bealady's anomaly Why is it so ?
"FIFO sometimes can support stack property" And sometimes not and so,it will fall in bealady's anomalyWhy is it so ?
Prince Sindhiya
151
views
Prince Sindhiya
asked
Sep 30, 2018
Operating System
page-replacement
algorithms
+
–
0
votes
1
answer
1223
time complexity
If both of the algorithms A and B need O(nlogn) time then they both are equally efficient and finish in same amount of time. TRUE OR FALSE
If both of the algorithms A and B need O(nlogn) time then theyboth are equally efficient and finish in same amount of time.TRUE OR FALSE
sushmita
578
views
sushmita
asked
Sep 28, 2018
Algorithms
time-complexity
algorithms
asymptotic-notation
+
–
0
votes
1
answer
1224
MIT assignment
Find the complexity of the following code fragment: int i = 1; for(; i <= n logn; i++) { for(i++; i <= n; i++) { printf("1") } }
Find the complexity of the following code fragment:int i = 1; for(; i <= n logn; i++) { for(i++; i <= n; i++) { printf("1") } }
sushmita
847
views
sushmita
asked
Sep 28, 2018
Algorithms
time-complexity
algorithms
mit-quiz
+
–
1
votes
6
answers
1225
Can we solve the recurrence T(n) = T(n/2) + 2^n by masters theorem, if possible?
I was wondering whether the recurrence T(n) = T(n/2) + 2n could be solved by using master theorem, and what would be the way. I tried solving the recurrence but can't. There is no mention to it in CLRS book. Please help. Thanks in advance.
I was wondering whether the recurrence T(n) = T(n/2) + 2n could be solved by using master theorem, and what would be the way. I tried solving the recurrence but can't. Th...
mohitrai0_0
19.0k
views
mohitrai0_0
asked
Sep 28, 2018
Algorithms
recurrence-relation
algorithms
master-theorem
time-complexity
asymptotic-notation
+
–
1
votes
2
answers
1226
MIT ASSIGNMENT
Find the complexity of the following function when called with some integer n: void foo(n) { int i,j,k,x=0; for (i=1 ; i <= n ; i++) for (j=1 ; j <= i * i ; j++) for ( k = 1 ; k <= j ; k++) { x=x+10; } }
Find the complexity of the following function when called with some integer n:void foo(n) { int i,j,k,x=0; for (i=1 ; i <= n ; i++) for (j=1 ; j <= i * i ; j++) for ( k ...
sushmita
707
views
sushmita
asked
Sep 28, 2018
Algorithms
algorithms
time-complexity
mit-quiz
+
–
0
votes
2
answers
1227
MIT ASSIGNMENT
FIND THE TIME COMPLEXITY int i=1,j; for(;i <= n;i + +) { for(j = i; j <= nlogn; j∗= 2) { sum++; } }
FIND THE TIME COMPLEXITYint i=1,j; for(;i <= n;i + +) { for(j = i; j <= nlogn; j∗= 2) { sum++; } }
sushmita
791
views
sushmita
asked
Sep 28, 2018
Algorithms
algorithms
time-complexity
mit-quiz
+
–
0
votes
1
answer
1228
MIT assigment
Arrange the following functions in their increasing order of complexities. $f(n) = n ^{0.999999} * \log n$ ($\log n$ is not in power) $g(n) = 10000 n$ $h(n) = n^{2}$ $k(n) = (1.000001)^{n}$ $p(n) =\large \frac{2 ^{√n}}{ n^{2}}$ $q(n) = \Large \frac{n^{1.000001}}{\log n}$
Arrange the following functions in their increasing order of complexities.$f(n) = n ^{0.999999} * \log n$ ($\log n$ is not in power)$g(n) = 10000 n$$h(n) = n^{2}...
sushmita
1.7k
views
sushmita
asked
Sep 28, 2018
Algorithms
time-complexity
algorithms
asymptotic-notation
+
–
0
votes
0
answers
1229
mit assignment
State true/false f(n) != O(g(n)) and g(n) != O(f(n))
State true/falsef(n) != O(g(n)) and g(n) != O(f(n))
sushmita
332
views
sushmita
asked
Sep 28, 2018
Algorithms
algorithms
time-complexity
asymptotic-notation
+
–
0
votes
2
answers
1230
time complexity
Gate Fever
1.9k
views
Gate Fever
asked
Sep 27, 2018
Algorithms
algorithms
time-complexity
test-series
+
–
Page:
« prev
1
...
36
37
38
39
40
41
42
43
44
45
46
...
118
next »
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register