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
Jada lives in a city that has an area of 344.6 square miles. Her friend lives in a town that is 1/10th that size. What is the ar
svetlana [45]
34.46 sqare miles 344.6 times 0.1 one tenth the size braniest please
8 0
3 years ago
Deja had two baskets of berries. One of the baskets has 3 3/8 pounds of berries and the other basket has 2 7/8 pounds of berries
Colt1911 [192]
Each person would receive 1.5625 pounds of berries.
7 0
3 years ago
Use yes or no Can you please help me
Gemiola [76]
The answer Yes, yes, no
7 0
2 years ago
Help me pls!! thanks <3
Softa [21]

Answer:

It is graph A

Step-by-step explanation:

4 0
2 years ago
Read 2 more answers
400,000 in expanded form
Anestetic [448]
4*1000 is the answer to the problem. plz give me a brainliest answer because i spent alot of work on that

7 0
3 years ago
Read 2 more answers
Other questions:
  • What's 12748 rounded to the nearest thousand
    10·1 answer
  • Find two SQUARE numbers that have a sum of 130
    5·1 answer
  • Lana cuts 2 pieces for every 7 inches from a dowel for a craft project, for a total of 1 pieces. What is the length of the dowel
    7·1 answer
  • What is the answer to 5x-14=8x+4
    10·1 answer
  • Debra is on the swim team. Each week she swims a total of 7000 meters. How many kilometers does she swim each week?
    8·1 answer
  • Over the summer, for every 11 okra seeds Dana planted, 6 grew into plants. If he planted 110 okra seeds, how many grew into plan
    13·1 answer
  • 4. Square ABCD is shown. What is the length of diagonal AC? Round to the nearest tenth, if necessary.
    14·1 answer
  • What is 11/20 in a decimal
    14·2 answers
  • Which expression could be represented by this model?
    6·1 answer
  • Ron is collecting tickets for a school play and needs to determine how many people are attending the show. Several groups give h
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!