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
What is 53.67 to one decimal place
MAXImum [283]
53.67 to one decimal place is 53.7 since you round the .6 to the .7
8 0
3 years ago
Read 2 more answers
Part A<br> Rewrite 0.5 as an exponential expression with a base of 2.
koban [17]

Answer:

2^{-1}

Explanation:

05/10

Simplifying

1/2

or 2^-1

Hope this helps you. Do mark me as brainlist

4 0
2 years ago
spencer spent 4 hours doing chores over the weekend. If he spent 2/3 for an hour on each chore, how many chores did he do.
Elina [12.6K]
2/3 + 2/3 + 2/3 + 2/3
8/3
2 2/3
4 0
3 years ago
Write three expressions that are equivalent to 2^6
aleksandr82 [10.1K]

Answer:

well 2^6 = 64 so 8x8, 32x2 and 16x4 would all be correct

4 0
3 years ago
A restaurant served Six slices of pie during lunch and lunch and 4 during dinner today how many slices of pie were served today
rewona [7]

Answer:

10 (?)

Step-by-step explanation:

6 during lunch + 4 during dinner would be 10. Not sure why you said lunch twice.

7 0
3 years ago
Other questions:
  • 20 points<br> What is the value of p in the linear equation ?<br> −4<br> −2<br> 2<br> 4
    14·2 answers
  • A drive way is 40 yards long. About how many meters lobg is it
    11·2 answers
  • In psychology, there is a particular Mental Development Index (MDI) used in the study of infants. The scores on the MDI have app
    5·1 answer
  • What is 66×21? idk help me plz​
    14·1 answer
  • Help!! i cant figure it out
    14·2 answers
  • Find the x in the following triangle <br> I’ll give brainliest
    13·1 answer
  • Someone lost their wedding ring and found it 16 years later on a carrot in her garden
    6·2 answers
  • What means ratio with explanation​
    12·2 answers
  • Solve for x 18=r/2 as a fraction​
    13·1 answer
  • In the figure, r s.
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!