subject

1) // Compute the maximum element in the array a.
Algorithm max (a) :
max = a [0]
for i = 1 to len (a)-1
if a[i] > max
Max _ a[i]
return MEX
HERRERIE
2)
// Reverse the order of the elements in the array a.
Algorithm reverse (a):
for i = 1 to len (a)-1
313]
for j = i downto 1
alj] = a[j-1)
a [0]
1
*

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 04:30
Eye injuries usually occur as a result of all of the following things, except: a) proper machine operation b) battery explosion c) falling or flying debris d) electric welding arc
Answers: 2
question
Computers and Technology, 22.06.2019 17:30
Working on this program in python 3.7: a year in the modern gregorian calendar consists of 365 days. in reality, the earth takes longer to rotate around the sun. to account for the difference in time, every 4 years, a leap year takes place. a leap year is when a year has 366 days: an extra day, february 29th. the requirements for a given year to be a leap year are: 1) the year must be divisible by 42) if the year is a century year (1700, 1800, the year must be evenly divisible by 400some example leap years are 1600, 1712, and 2016.write a program that takes in a year and determines whether that year is a leap year.ex: if the input is 1712, the output is: 1712 is a leap year. ex: if the input is 1913, the output is: 1913 is not a leap year. your program must define and call the function isleapyear(useryear). the function should return true if the input year is a leap year and false otherwise.
Answers: 1
question
Computers and Technology, 22.06.2019 17:40
Gabe wants to move text from one document to another document. he should copy the text, paste the text, and open the new document highlight the text, select the cut command, move to the new document, make sure the cursor is in the correct location, and select the paste command select the save as command, navigate to the new document, and click save highlight the text, open the new document, and press ctrl and v
Answers: 1
question
Computers and Technology, 22.06.2019 20:00
What side length would you specify if you were required to create a regular hexagonal plate that was composed of 33 cm(squared) of sheet metal? dimension the side length to 0.1 cm
Answers: 2
You know the right answer?
1) // Compute the maximum element in the array a.
Algorithm max (a) :
max = a [0]
...
Questions
question
Mathematics, 25.10.2021 14:00
question
Social Studies, 25.10.2021 14:00
question
Mathematics, 25.10.2021 14:00
Questions on the website: 13722360