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
Softa [21]
2 years ago
11

Give a recursive algorithm which takes as input a sequence of numbers and returns the minimum (i.e., smallest) number in the seq

uence. Your algorithm should not use a loop.
Mathematics
1 answer:
kodGreya [7K]2 years ago
5 0

Answer:

Step-by-step explanation:

So let a[i] be the input array to the function find_minimum(): . We will use python to present this recursive algorithm

def find_minimum(a, n):

    if n == 1:

         return a[0]

    return min(a[n], find_minimum(a, n - 1))

find_minimum(a, len(a) - 1)

You might be interested in
Vicki puts 10 books on a shelf. The 10 books take up 28 cm. What is the mean (average) thickness of her books? Can I have it wor
netineya [11]
Average thickness of book = Total thickness/mo. of books
= 28 cm/ 10
= 2.8 cm
Thus, on average, each book has 2.8 cm thickness.
5 0
2 years ago
Read 2 more answers
A dealer buys oranges for 100000, he sold 60% of them for buying price, he sold 50% of the remaining for profit of 60% then he s
suter [353]

Based on the amount of oranges bought, those sold at a profit and those sold at a loss, the overall profit is 14.2%

<h3>What is the overall profit?</h3>

Assume that the buying price was $1 each.

The amount earned from 60% of them is:

= 60% x 100,000 x 1

= $60,000

The profit from selling 50% of the remaining is:

= (50% x 40,000) x 1.60

= $32,000

The loss from selling the other 50%:

= (50% x 40,000) x 0.90

= $22,222.22

Total selling price:

= 60,000 + 32,000 + 22,222.22

= $114,222.22

Total profit:

= (114,222.22 - 100,000) / 100,000

= 14.2%

Find out more on sales profit at brainly.com/question/19104371

#SPJ1

7 0
11 months ago
Which angles are corresponding angles with angle 8?
Basile [38]

Answer:

<4 and <8

Step-by-step explanation:

Corresponding angles are at the same part of the intersection of

8 and 12 are corresponding angles

8 and 4 are corresponding angles

7 0
2 years ago
Read 2 more answers
Or yk dont answer my question thats coo :/
san4es73 [151]

Answer:

whats the question i might be able to help

Step-by-step explanation:

:)))))))

6 0
2 years ago
A line passes through the point (6,-6) and has a slope of 3/2. Write a equation in point-slope form for this line
Maru [420]

Answer: y+6=\frac{3}{2} (x-6)

Step-by-step explanation:

use the equation y-y_{1} =m(x-x_{1})

we know the slope, y, and x, so plug in

y-(-6)=\frac{3}{2} (x-(6))

y+6=\frac{3}{2} (x-6)

8 0
3 years ago
Read 2 more answers
Other questions:
  • Eric can run I mile in<br> 6.5 minutes. How long<br> will it take him to run<br> 3.5 miles?
    5·1 answer
  • List all the factors of 33
    10·1 answer
  • Which rational expression has a value of 0 when x = 2 ? A) 7x -5/x2 + 10 B) -3x +6/8x-9 C) -5x + 8 / x-2
    13·2 answers
  • 86,921 in expanded form
    12·2 answers
  • Quick mathswatch ASAP Will give brainliest for the person who explains
    15·2 answers
  • Yall im almost done pls HELP
    7·1 answer
  • Write a scenario that could work for the following line of best fit:
    5·2 answers
  • What are postive and negative numbers
    6·1 answer
  • Expand the following :<br><br>A) 2(x+3)<br><br>B) 5(2x-4)<br><br>C) 4(2x+1)<br><br>D) 6(x-4y)​
    8·1 answer
  • Pls ans I will give brilliant who ever ans first!
    12·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!