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
Aisha estimates the product of 12 and 2.4 by rounding 2.4 to the nearest whole.
Tanya [424]

Answer:

24

Step-by-step explanation:

12*2=2

2.4 rounds down

8 0
2 years ago
7) Find EC<br> 16<br> E-<br> B<br> D<br> С<br> 49<br> 30
lana66690 [7]
Answer:

EC = 35

Step-by-step explanation:

The whole entire line measures 49

DB measures 30

49 - 30 = 19 or ED

But we’re looking for EC so…

19 + 16 = 35

EC = 35
3 0
3 years ago
‼️‼️help please ASAP ‼️
Snezhnost [94]
Its A or 6 because 30 divided by 5 is 6
5 0
3 years ago
mr. tyler has a total of $5,000 in savings account and in a mutual fund. If he has x dollars in the savings account, how much do
eduard
5000-x is the number of dollars in the mutual fund
6 0
3 years ago
Read 2 more answers
Two sides of a four-sided figure have negative slopes. Which are the endpoints of the sides of this figure?
kkurt [141]

Answer:

a

Step-by-step explanation:

6 0
3 years ago
Read 2 more answers
Other questions:
  • i found a place that will give me 20% discount if i buy something over $50. My bill is $75. What is my final bill after the savi
    6·1 answer
  • If f(x) = x^2 + 1 and g(x) = 3x + 1, find 2f(1) + 3g(4)
    8·2 answers
  • Using elimination, the equations 3x - 4y = 12 and x + 4y = 20 can be solved to show that x = 8 and y = 3. Is this true or false
    7·2 answers
  • What is the place value of the 2 in 6,025?
    12·2 answers
  • there is an unknown number in the sequence counting backward. The number is after 48. The number is before 46. What is the unkno
    8·1 answer
  • (1) Mr. Rawlins took a quiz with 12 problems and he got 10 of them right. What percentage of the quiz did he get correct? *
    11·2 answers
  • HELP! 10 points!!
    10·1 answer
  • 23,465 Round to the nearest ten
    12·2 answers
  • The perimeter of the rectangle below is 50cm.<br> find the value x
    8·1 answer
  • Which of the following is the solution to the equation
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!