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
You are given a choice of taking the simple interest on $100,000 invested for 2 years at a rate of 3% or the interest on $100,00
valentinak56 [21]

Answer:

Step-by-step explanation:

the simple interest formula= principal* interest rate*time

simple interest : 100000*%2*2 years

simple interest= 4000 dollars

compound quarterly : A=principal(1+r/4)^t

since it is quarterly and have 4 quarters in a year, and 8 in two years.

compound quarterly: 100000(1+0.03/4)^8=106159.88

it is better to invest with compound interest because it add 6159 dollars in two years to the investment of 100000 dollars.

the difference between the interest: 6159.88-4000=2159.88

5 0
3 years ago
PLZ HELP I AM STUCK!
zaharov [31]
Every whole number<span> is a </span>rational number: for example, 3=31. ... Everywhole number<span> n can be written as a fraction of integers: n=n1. We aren't required to write it that way; we just need to know that it is possible to express every </span>whole number<span> as a fraction of integers, and hence it is </span>rational<span>.

So I Believe the Correct Answer would Be D)</span><span> If a number is not a rational number, then it is not a whole number. The converse is true</span>
3 0
4 years ago
A store sells 214 214 pounds of tomatoes in a package for $4.45$4.45. The expression 4.45p4.45p represents the cost of the tomat
Rus_ich [418]
The answes r is  7.94 $
8 0
3 years ago
Read 2 more answers
In the year 2007, a company made $4 million in profit. For each consecutive year after that, their profit increased by 14%. How
Dafna11 [192]

Answer:

$6.76 million

Step-by-step explanation:

The computation of the profit of the year in 2011 is shown below:

Given that

In year 2007, it made $4 million profits

And it would be increased by 14% till 2011

So,

= $4 million × (1 + 0.14)^4

= $4 million × 1.68896016

= $6.76 million

5 0
3 years ago
What is x equal to????
Ksju [112]

Answer:

x = 20

Step-by-step explanation:

The 3 arcs UV, VW, WX form a semicircle, so sum to 180° , that is

4x + 2 + x + 78 = 180

5x + 80 = 180 ( subtract 80 from both sides )

5x = 100 ( divide both sides by 5 )

x = 20

5 0
3 years ago
Other questions:
  • A cell with 2cm sides has what surface area?
    10·1 answer
  • Evaluate Cot0 if sin0= square root of 6/5
    15·1 answer
  • Can someone please help me with this math problem?? It’s Special Right Triangles: Decimal Answers ! Round to the nearest tenth.
    12·1 answer
  • What's the next pattern of these numbers 128,134,140,146,152
    9·1 answer
  • The ratios 9:18, 12:24, 15:30, 18:36, and 21:42 form a pattern of equivalent ratios in the table below.
    14·2 answers
  • Suppose we have a bag with 10 slips of paper in it. Eight of these have a 2 on them and the other two have a 4 on them.
    6·2 answers
  • David wants to build a rectangular fencing with the 5 identical parts for his animals. He has 780 feet of fencing to make it. Wh
    11·1 answer
  • 1. Mr. Ortiz used similar triangles to make a design. Which statement about the triangles in the
    12·1 answer
  • Jamal buys postcards of Washington, D.C., for $14.62, not including tax. Each postcard costs $0.86. How many postcards does Jama
    5·1 answer
  • -----<br> Negative 5 minus negative 1 equals
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!