subject

1. (3 points) - describe using pseudocode as described in class an algorithm that takes a list of n integers a1, a2, …, an, and returns the sum of the largest and smallest. be sure to initialize the variables. 2. (4 points) – the bubble sort algorithm discussed in class is used to sort the following sequence of integers: 2 16 38 9 4 14 • how many passes must the algorithm perform to guarantee the entire sequence is sorted? • what is the list obtained after the first pass? • what is the list obtained after the third pass? • what is the list obtained after the final pass? 3. (3 points) - show how the binary search algorithm discussed in class searches for 24 in the sorted list below: 2 4 6 7 10 31 32 34 35 37 39 40

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 09:40
In the lab, which of the following displayed a list of all installed services and included a description of the service, the current state, and whether the service started automatically or manually? a. the services manager b. the applications summary c. the recommended services d. list the safe services list
Answers: 2
question
Computers and Technology, 22.06.2019 18:00
When is it appropriate to use an absolute reference
Answers: 1
question
Computers and Technology, 23.06.2019 09:00
The first screen you see when you open word2016 what is called?
Answers: 1
question
Computers and Technology, 23.06.2019 15:30
1. ask the user how many questions are in the quiz. 2. ask the user to enter the key (that is, the correct answers). there should be one answer for each question in the quiz, and each answer should be an integer. e.g., 34 7 13 100 81 3 9 10 321 12 might be the key for a 10-question quiz. you will need to store the key in an array. 3. ask the user to enter the answers for the quiz to be graded. there needs to be one answer for each question. note that these answers do not need to be stored; each answer can simply be compared to the key as it is entered. 4. when the user has entered all of the answers to be graded, print the number correct and the percent correct. 5. add a loop so that the user can grade any number of quizzes with a single key. after the results have been printed for each quiz, ask "grade another quiz? (y/n)." note: you only have one array (the key). you are not creating a new key for each set of quiz answers.
Answers: 3
You know the right answer?
1. (3 points) - describe using pseudocode as described in class an algorithm that takes a list of n...
Questions
question
Mathematics, 30.08.2019 23:30
question
Health, 30.08.2019 23:30
Questions on the website: 13722359