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, 23.06.2019 11:30
Auser is given read permission to a file stored on an ntfs-formatted volume. the file is then copied to a folder on the same ntfs-formatted volume where the user has been given full control permission for that folder. when the user logs on to the computer holding the file and accesses its new location via a drive letter, what is the user's effective permission to the file? a. read b. full control c. no access d. modify e. none of the above
Answers: 1
question
Computers and Technology, 24.06.2019 00:40
Use a software program or a graphing utility with matrix capabilities to solve the system of linear equations using an inverse matrix. x1 + 2x2 − x3 + 3x4 − x5 = 6 x1 − 3x2 + x3 + 2x4 − x5 = −6 2x1 + x2 + x3 − 3x4 + x5 = 3 x1 − x2 + 2x3 + x4 − x5 = −3 2x1 + x2 − x3 + 2x4 + x5 = 5
Answers: 3
question
Computers and Technology, 24.06.2019 00:50
3. what is the output of the following statements? temporary object1; temporary object2("rectangle", 8.5, 5); temporary object3("circle", 6, 0); temporary object4("cylinder", 6, 3.5); cout < < fixed < < showpoint < < setprecision(2); object1.print(); object2.print(); object3.print(); object4.print(); object1.set("sphere", 4.5, 0); object1.print();
Answers: 1
question
Computers and Technology, 24.06.2019 00:50
Which player type acts on other players? a. killer b. achiever c. explorer d. socializer
Answers: 1
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
Physics, 22.11.2020 22:30
question
Mathematics, 22.11.2020 22:30
question
Health, 22.11.2020 22:30
question
Mathematics, 22.11.2020 22:30
Questions on the website: 13722361