1. (5 points) Use the following code to prove that INSERTION sort runs in θ(n2), define the coast and time of every line of code, and use them in your prove.
2. (5 points) Specify the lowest Big-Oh Complexity of each Algorithm (Show Steps) (a) (1 point) f (x) = 100x + 0.01x2.
(b) (1 point) f (x) = 0.01xlog2x + x(log2x)2.
(c) (1 point) f (x) = 2x + x0.5 + 0.5x1.25.
(d) (1 point) f (x) = 0.3x + 5x1.5 + 2.5x1.75.
(e) (1 point) f (x) = x2 + 5x + 1
3. (5 points) Write a short recursive Python function that finds the minimum and maxi- mum values in a sequence without using any loops.
4. (5 points) prove by induction, that for all n >= 1 the sum of the squares of the first n Positive integers is given by the formula
5.(5 points) Illustrate a complete trace of a merge sort of the following array. Show all the arrays using a tree diagram, how can you prove MERGE sort runs in O(nlogn)
5 | 8 | 2 | 8 | 1 | 9 | 4 | 3 | 7 |
6. (5 points) Demonstrate what happens when we insert keys 5, 28, 19, 15, 20, 33, 12, 17, 10 into a hash table with collisions resolved by chaining. Let the table have 9 slots, and let the hash function be
h(k) = k mod 9
[meteor_slideshow slideshow="slide3"]Are you looking for a similar paper or any other quality academic essay? Then look no further. Our research paper writing service is what you require. Our team of experienced writers is on standby to deliver to you an original paper as per your specified instructions with zero plagiarism guaranteed. This is the perfect way you can prepare your own unique academic paper and score the grades you deserve.
[meteor_slideshow slideshow="slide2"]Use the order calculator below and get ordering with idealtermpapers.com now! Contact our live support team for any assistance or inquiry.
[order_calculator]