subject

1) Insertion Sort a) Describe its algorithm (pseudo code). b) Explain its complexity in detail. c) Use a) to demonstrate the step-by-step operations for sorting 5, 9, 1, 20, 45, 13 2) Selection Sort a) Describe its algorithm (pseudo code). b) Explain its complexity in detail. c) Use a) to demonstrate the step-by-step operations for sorting 5, 9, 1, 20, 45, 13 3) Bubble Sort a) Describe its algorithm (pseudo code). b) Explain its complexity in detail. c) Use a) to demonstrate the step-by-step operations for sorting 5, 9, 1, 20, 45, 13 6) Merge Sort a) Describe its algorithm (pseudo code). b) Explain its complexity in detail. c) Use a) to demonstrate the step-by-step operations for sorting 5, 9, 1, 20, 45, 13 6) Quick Sort a) Describe its algorithm (pseudo code). b) Explain its complexity in detail. c) Use a) to demonstrate the step-by-step operations for sorting 5, 9, 1, 20, 45, 13

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 01:00
)a grad student comes up with the following algorithm to sort an array a[1..n] that works by first sorting the first 2/3rds of the array, then sorting the last 2/3rds of the (resulting) array, and finally sorting the first 2/3rds of the new array. 1: function g-sort(a, n) . takes as input an array of n numbers, a[1..n] 2: g-sort-recurse(a, 1, n) 3: end function 4: function g-sort-recurse(a, `, u) 5: if u ⒠` ≤ 0 then 6: return . 1 or fewer elements already sorted 7: else if u ⒠` = 1 then . 2 elements 8: if a[u] < a[`] then . swap values 9: temp ↠a[u] 10: a[u] ↠a[`] 11: a[`] ↠temp 12: end if 13: else . 3 or more elements 14: size ↠u ⒠` + 1 15: twothirds ↠d(2 ◠size)/3e 16: g-sort-recurse(a, `, ` + twothirds ⒠1) 17: g-sort-recurse(a, u ⒠twothirds + 1, u) 18: g-sort-recurse(a, `, ` + twothirds ⒠1) 19: end if 20: end function first (5 pts), prove that the algorithm correctly sorts the numbers in the array (in increasing order). after showing that it correctly sorts 1 and 2 element intervals, you may make the (incorrect) assumption that the number of elements being passed to g-sort-recurse is always a multiple of 3 to simplify the notation (and drop the floors/ceilings).
Answers: 3
question
Computers and Technology, 22.06.2019 22:30
Alex’s family members live in different parts of the world. they would like to discuss the wedding plans of one of their distant relatives. however, alex wants all the family members to talk to each other simultaneously so that they can make decisions quickly. which mode of internet communication should they use? a. blog b. email c. wiki d. message board e. instant messaging
Answers: 2
question
Computers and Technology, 23.06.2019 14:30
Which of the following would not be considered a pc? a. mainframe b. desktop c. tablet pc d. laptop
Answers: 2
question
Computers and Technology, 24.06.2019 02:20
The first time a user launches the powerpoint program, which view is shown allowing the user to access recent presentations or create new presentations based on templates?
Answers: 1
You know the right answer?
1) Insertion Sort a) Describe its algorithm (pseudo code). b) Explain its complexity in detail. c) U...
Questions
question
Biology, 18.02.2022 19:40
question
History, 18.02.2022 19:40
question
Mathematics, 18.02.2022 19:40