![subject](/tpl/images/cats/mat.png)
Mathematics, 12.12.2019 00:31 chasityn5648
Consider the bucket sort algorithm. the pseudocode1 for bucket sort is given below. bucket-sort(a) 1 2 3 4 5 6 7 8 9 10 (a) (b) n = a. length let b[0..nā1] be an empty array fori=0tonā1 make b[i] an empty list fori=0tonā1 insert a[i] into list b[hash(a[i])] / hashing function determines which bucket element goes into fori=0tonā1 sort list b[i] with insertion sort concatenate the lists b[0], b[1], . . , b[n ā 1] together in order argue that the worst-case running time for bucket sort is o(n2). provide a scenario in which this happens. [5 pts] by replacing insertion sort with a more efficient mergesort or heapsort in line 9 of the pseudocode, bucketsort can achieve a worst-case running time of o(nlogn) instead of o(n2). argue why switching insertion sort to a more "efficient" sort is not a good idea. hint: when would you use bucket sort in the first place? [5pts]
![ansver](/tpl/images/cats/User.png)
Answers: 3
Another question on Mathematics
![question](/tpl/images/cats/mat.png)
Mathematics, 21.06.2019 15:00
How can you decide witch operations to use to slice a two step equation
Answers: 2
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/mat.png)
Mathematics, 21.06.2019 19:20
1- what do you think the product of a nonzero rational number and an irrational number is? is it rational or irrational? make use of variables, the closure property of integers, and possibly a proof by contradiction to prove your hypothesis.2- why do we have to specify that the rational number must be nonzero when we determine what the product of a nonzero rational number and an irrational number is? if the rational number were 0, would it give us the same result we found in the first question?
Answers: 2
You know the right answer?
Consider the bucket sort algorithm. the pseudocode1 for bucket sort is given below. bucket-sort(a) 1...
Questions
![question](/tpl/images/cats/mat.png)
Mathematics, 17.11.2020 09:10
![question](/tpl/images/cats/mat.png)
Mathematics, 17.11.2020 09:10
![question](/tpl/images/cats/obshestvoznanie.png)
![question](/tpl/images/cats/fizika.png)
Physics, 17.11.2020 09:10
![question](/tpl/images/cats/mat.png)
Mathematics, 17.11.2020 09:10
![question](/tpl/images/cats/mat.png)
Mathematics, 17.11.2020 09:10
![question](/tpl/images/cats/himiya.png)
Chemistry, 17.11.2020 09:10
![question](/tpl/images/cats/mat.png)
Mathematics, 17.11.2020 09:10
![question](/tpl/images/cats/istoriya.png)
![question](/tpl/images/cats/istoriya.png)
![question](/tpl/images/cats/himiya.png)
Chemistry, 17.11.2020 09:10
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/biologiya.png)
![question](/tpl/images/cats/pravo.png)
![question](/tpl/images/cats/en.png)
English, 17.11.2020 09:10
![question](/tpl/images/cats/himiya.png)
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/biologiya.png)
![question](/tpl/images/cats/en.png)