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
Is 3 x 5/6:<br> A: 15/6<br> B:15/18<br><br> ????
kiruha [24]

Answer:

3 x 5/6 is 2.5, so 15/6

Step-by-step explanation:

3/1 x 5/6

6 0
3 years ago
Read 2 more answers
What is the value of x? please hurry
larisa86 [58]

Answer:

x = 22°

Step-by-step explanation:

158 + x = 180

x = 180 - 158

x = 22

6 0
3 years ago
Read 2 more answers
Tony is comparing two checking accounts. one has a monthly fee of $15 and a per-check fee of $0.20, and the other has a monthly
monitta
$20 minus $15 = $5 difference
$5 divided by $0.20 = 25 checks
*Now the accounts are even, except I haven't done the checks for the second account.*
25 checks times $0.10 = $2.50
$2.50 divided by $0.20 = 12.5 checks (round up in this case to 13)
*Now, you need to do 13 more checks on the second account*
13 checks times $0.10 = $1.30
$1.30 divided by $0.20 = 6.5 checks (round up in this case to 7)
*Now, you need to do 7 more checks on the second account*
7 checks times $0.10 = $0.70
$0.70 divided by $0.20 = 3.5 checks (round up in this case to 4)
*Now, you need to do 7 more checks on the second account*
4 checks times $0.10 = $0.40
$0.40 divided by $0.20 = 2 checks
*Now, you need to do 2 more checks on the second account*
2 checks times $0.10 = $0.20
$0.20 divided by $0.20 = 1 check
*Now, you need to do 1 more checks on the second account*
1 checks times $0.10 = $0.10
$0.10 divided by $0.20 = 0.5 checks (round up in this case to 1)
*Now, you need to do 1 more checks on the second account*
1 checks times $0.10 = $0.10
$0.10 divided by $0.20 = 0.5 checks
25 + 13 + 7 + 4 + 2 + 1 + 1 = 53 checks

Check your work!
Account #1- $15 + (53 times $0.20) = $25.60
Account #2- $20 + (53 times $0.10) = $25.30

Answer
53 checks

7 0
4 years ago
What is the slope of y=-4
Paraphin [41]

the slope of y= -4 is 0

6 0
3 years ago
Read 2 more answers
Ileana buys a large circular pizza that is divided into eight equal slices. She measures along the outer edge of the crust from
goldenfox [79]

Answer:

14 inches

Step-by-step explanation:

She measures along the outer edge of the crust from one piece and finds it to be 5.5 inches.

We need to find the diameter of the pizza. A pizza is divided into 8 equal parts.

The circumference of one part = \dfrac{2\pi r}{8}=\dfrac{\pi r}{4}

So,

\dfrac{\pi r}{4}=5.5\\\\2r=D=14\ inch

So, the diameter of the pizza is 14 inches.

8 0
3 years ago
Other questions:
  • The table shows values for functions f(x) and g(x) .
    8·2 answers
  • Guys help please!!!!!
    12·1 answer
  • Piglet measured the rectangle on his paper. Two sides were each 4 inches long. If the perimeter of the rectangle was 30 inches h
    6·1 answer
  • What is the median. I have 3 more questions that have to deal with the median.
    15·1 answer
  • Help me due tomorrow at 4
    10·1 answer
  • Help me plssssssss!!!!!!!
    12·1 answer
  • Can someone pls give me the answer to this?
    10·1 answer
  • The average square of toilet paper measures 4.1" x 4.1." If one roll of toilet paper has 329 squares, what is the total area of
    10·1 answer
  • The words above say “the expression x-2 has a value of -5 for some value of x. For the same value of x, what is the value of the
    9·1 answer
  • Name each angle pair
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!