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

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 02:30, hailey5campbelp7d1c0
What is the power dissipated by a resistor with a current of 0.02 a and a resistance of 1,000 ? a. 200 w b. 20 w c. 0.4 w d. 4 w
Answers: 1
image
Computers and Technology, 23.06.2019 02:50, bfell92
There’s only one game mode that stars with the letter ‘e’ in cs: go. which of the options below is it?
Answers: 1
image
Computers and Technology, 23.06.2019 14:30, officialrogerfp3gf2s
Select the correct answer. a company wants to use online methods to target more customers. it decides to conduct a market research by collecting the data of a few customers with their consent. they want to track data of the sites that their customers frequently visit. which software can the company? a. spyware b. bots c. adware d. trojan horse e. rootkits
Answers: 1
image
Computers and Technology, 24.06.2019 04:30, BobBball9126
How do you share someone else’s tweet with your own twitter followers?
Answers: 1
You know the right answer?
1) // Compute the maximum element in the array a.
Algorithm max (a) :
max = a [0]
...

Questions in other subjects:

Konu
Mathematics, 20.02.2020 18:26