java 4

AcademicWritersDen.com boasts a team of highly skilled and experienced writers who specialize in various academic fields. The company carefully selects its writers through a rigorous screening process to ensure that they possess the necessary qualifications and expertise. Whether it’s an essay, research paper, or any other homework assignment, students can rely on AcademicWritersDen.com to connect them with professionals who have an in-depth understanding of the subject matter. This ensures that the work delivered is of high quality and meets the academic standards set by educational institutions.

ANSWER MUST BE TYPED WITHIN THE QUESTIONS BELOW

Searching and Sorting (Chapter 18) (30 pts.)

1. Regarding the behavior of algorithms (i.e., rate of growth, big-Oh analysis) (6 pts.)

(a)The rate of growth of a given algorithm can be determined either analytically

(by inspection of the algorithm and use of mathematics), or empirically (by
implementing it and executing on various size input). TRUE / FALSE

(b)To determine which of two algorithms that solve the same problemhas the slowest rate
of growth (i.e., that is generally more efficient), it is sufficient to implement and execute
each on a sufficiently large problem and compare therun times. TRUE / FALSE

(c)For most algorithms, solving a problem that is twice as big takes more than
double the amount of time. TRUE / FALSE

2. For the following rates of growth, answer the following(selecting from the rates of growth
to the right): (12 pts.)

(a) Fastest can sort (for general sorting) ______O(2n)

(b)Fastest can search a sorted list______O(n3)

(c) Fastest can search an unsorted list ______O(n2 logn)

(d)Intractable rate of growth ______O(n2)

(e) Average rate of growth of BubbleSort ______O(nlogn)

(f)Constant time regardless of problem size ______O(n)

O(logn)

O(1)

3. Give the resulting lists after the first TWO passes of Selection Sort, Insertion Sort, BubbleSort,
and QuickSort under the headings below. For QuickSort, assume that the FIRST ITEM in each
sublist is always chosen as the pivot value (which is not a problem when lists are randomly
ordered). (12 pts.)

Selection SortInsertion SortBubbleSort QuickSort

20

31

6

19

28

4

9

36

 

 
Do you need a similar assignment done for you from scratch? We have qualified writers to help you. We assure you an A+ quality paper that is free from plagiarism. Order now for an Amazing Discount!
Use Discount Code "Newclient" for a 15% Discount!

NB: We do not resell papers. Upon ordering, we do an original paper exclusively for you.