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]
3 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]3 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
Find the side length of the triangle
Levart [38]

Answer:

19

Step-by-step explanation:

The markings on the triangle means that this is an equilateral triangle (All sides are the same length)

So, we can set the two equations we have equal to each other

4x + 7 = 3x + 10

x + 7 = 10

x = 3

Plug it into either equation

3(3) + 10 = 19

7 0
3 years ago
(45 1/3 + 6 1/3)+38 2/3 ?
Marizza181 [45]

51 2/3+38 2/3

90 11/3

6 0
4 years ago
Read 2 more answers
STATE ALL OF THE MODULES THAT ARE INCLUDED IN DISCRETE MATHEMATICS.
serious [3.7K]

Module 1: set, relations, functions, numbers

Module 2: logic and boolean algebra

Module 3: combinatorics and probability

Module 4: graphs and trees

Module 5: induction and recursion

Module 6: grammars, languages and finite state machines.

4 0
3 years ago
What type of shape will the reflected figure be?
julsineya [31]
How does your figure look like?
8 0
3 years ago
Read 2 more answers
The town of San Simon charges its residents for trash pickup and water usage
dlinn [17]

Thats a tough one :/ good luck

8 0
3 years ago
Other questions:
  • Find the range of<br> 8. 14, 6, 12.11.9
    5·2 answers
  • Round 9118 to the nearest ten
    13·1 answer
  • Change 20 5/9 to an<br> improper fraction.
    7·2 answers
  • The pitchers for the home team had 12 strikeouts for 32 batters, while the pitchers for the visiting team had 15 strikeouts for
    6·1 answer
  • Plssss help...............
    10·2 answers
  • Twelve men can build a house in 5 days so 4 men can build the same project in how many days?​
    8·2 answers
  • Convert each percent into a fraction and decimal:<br> 133 1/2%<br> 87 1/3%<br> 0.01%<br> 8 1/3%
    12·1 answer
  • Toilet rolls are sold in packs of 4. <br><br>How many toilet rolls are there in 9 packs?​
    10·2 answers
  • Pls help ASAP will mark Brainlyest!!
    13·2 answers
  • What is the greatest common factor of 42 and 55?
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!