Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1. Bubble Sort: the difference between which items are in order after pass #x? b

ID: 3745666 • Letter: 1

Question

1. Bubble Sort: the difference between which items are in order after pass #x? bubble: selection b) What items are compared and possibly swapped in the bubble sort? c) What aspect of the bubble sort makes it more efficient than the insertion or selection sort for some lists? 2. Shell Sort: a) Which other quadratic sort does the Shell Sort mimic? b) What happens to the gap between numbers after all numbers separated by a given gap are in order? c) What does this sort accomplish better than the quadratic sorts by using different gaps? 3. Pointer Sort: a) How does this sort use pointers to sort an array of objects? b) For what type of data values is it the preferable one to use? 4. Bucket Sort: a) How does this sort use buckets to sort an array of numbers? b) For what type of data values is it the preferable one to use? 5. Radix Sort: a) If the radix sort is O(kn), what would the constant be for 16-bit binary numbers? b) How does the radix sort differ from all of the others for lots of large numbers? c) In what order the digits are accessed?

Explanation / Answer

Please Note: As per Chegg Answering Guidelines, I have answered the first question (question 3) as requested by you. Please Re-Post for the other Questions.

Answer)

Q3) a) How does this sort use pointer to sort an array of objects?

A pointer sort uses pointers to the data or the elements or the objects to sort the elements. The items are stored as records and objects. The pointers contain the indexes and addresses to the objects. In a general version of sorting, the data will be sorted in an array, nut in pointer sort, the array physically will not be changed. Rather, after pointer sorting (let's say ascending sort) is done, the first pointer will contain the address of the smallest element, the second pointer will have the address or pointer to the second smallest element and so on. While printing using the pointer, the elements will be sorted.

b) For what type of data values it is the preferable on to use?

Big objects containing data will have a problem for manipulation using arrays. Pointer sorting just changes the pointing of the addresses and thus, the integers as addresses are only swapped instead of the objects. Now, swapping or making many manipulations to objects will be costlier than making manipulations to integer values. Thus, other than easily changeable data types such as integers, Small string, characters, other objects and elements such as Currency, Real numbers, LongInteger is better to be used as Pointer sorting.