1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
kumpel [21]
3 years ago
12

give a recursive algorithm for finding the maximum of a finite set of integers, making use of the fact that the maximum of n int

egers is the larger of the last integer in the list and the maximum of the first n-1 integers in the list
Mathematics
1 answer:
Karolina [17]3 years ago
7 0

Answer:

Recursive algorithms call itself with simpler or smaller input values. They can be used to solve large problems by using the solutions to minor parts of the problem, these minor problems are then further broken down to solvable cases.

Given the input as a sequence;

max(z_{1}, z_{2}, ... z_{k}: integers)

if k=1 return z_{1}

else

          c=max(z_{1}, z_{2},...z_{k-1})

          if c > z_{1} return c

          else return z_{1}

You might be interested in
13<img src="https://tex.z-dn.net/?f=13%5Cfrac%7B1%7D%7B4%7D%20%2B2n%3D27%5Cfrac%7B3%7D%7B4%7D" id="TexFormula1" title="13\frac{1
Len [333]

Answer:

7 1/8

Step-by-step explanation:

Assuming that the first 13 was a mistake then the equation would be 13 1/2 + 2n = 27 3/4

subtrace 13 1/2 from 27 3/4

14 1/4

divide by 2

7 1/8

7 0
3 years ago
Solve each of the following exponential equations
Vika [28.1K]
5^x = 5^6

x = 6

hope it helps
4 0
3 years ago
At a coffee sale held one day in 2004 ,the average price of 50 kg bag of coffee was sh 2422.90 . What was the cost of 1 kg of co
gregori [183]

Answer: $ 48.46

Step-by-step explanation:

If the price of 50 Kg of coffee was 2422.99, what is the cost of 1 Kg of coffee?

50/1 = 2422.90/x (cross multiplication)

48.46

4 0
2 years ago
I WILL GET A ZERO SO PLEASE HELP! THANKS!!!
Setler79 [48]
M=6 is the correct answer
Plz mark brainliest
4 0
2 years ago
Read 2 more answers
0.8 is 10 times as great as wich decimal?
cestrela7 [59]
I don't know what to say, I've been trying to explain this for like... 10 minutes but I can't think of how to explain it. All I can say is to just divide .8 by 10. The answer is .08.
6 0
3 years ago
Other questions:
  • Which graph represents the solution set to this system of equations? –x + 2y = 6 and 4x + y = 3 On a coordinate plane, a line go
    14·2 answers
  • Find the degree of w
    9·2 answers
  • Steve and carol live 405 miles apart, they start at the same time and travel toward each other, Steve speed is 6mph greater than
    10·1 answer
  • What is the value of p in the linear equation ? −4 −2 2 4
    14·2 answers
  • The point-slope form of the equation of a line that passes through points (8, 4) and (0, 2) is y – 4 =1/4 (x – 8). what is the s
    8·1 answer
  • Somebody help plz I need help
    6·1 answer
  • Where does the graph of f(x)=2√-x+2 start?
    5·1 answer
  • Given y = x + 1 Calculate y if x = 3. y is a natural number​
    7·2 answers
  • ANSWER PLEASE !!!!!!<br>​
    15·1 answer
  • Lillie has read 45 books and read 10 books every year. Dean has read 23 books and reads 12 books every year. How many years will
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!