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
strojnjashka [21]
3 years ago
11

2. a. Write pseudocode for a divide-and-conquer algorithm for finding valuesof both the largest and smallest elements in an arra

y of n numbers.b. Set up and solve (for n = 2k) a recurrence relation for the number of keycomparisons made by your algorithm.c. How does this algorithm compare with the brute-force algorithm for thisproblem?
Computers and Technology
1 answer:
Lisa [10]3 years ago
6 0

The pseudocode :

Pair MaxiMini(array, sizeof_array)

if sizeof_array = 1

return element as both maximum and minimum

else if sizeof_array = 2

do one comparison to find the maximum and minimum

return that pair

else

# sizeof_array > 2

recursion for maximum and minimum of the left half

recursion for maximum and minimum of the right half

one comparison determines the true max of the two elements

one comparison determines the true min of the two elements

return the pair of maximum and minimum

You might be interested in
Question 8 of 25
denis23 [38]

Answer:

D to Protect sensitive data, Enterprise has certain security features and is mostly used in business settings.

5 0
2 years ago
If a network device has a mask of /28, how many IP addresses are available for hosts on this network?
Margaret [11]

Answer:

/28 -- 16 Subnets -- 14 Hosts/Subnet

14*16 = 224 hosts

Explanation:

see https://www.aelius.com/njh/subnet_sheet.html

3 0
3 years ago
In other programming languages, the dictionary data structure is referred to as a(an)
hjlf

Answer:

hash

Explanation:

it is called a <u>hash,</u><u> </u><u>a </u><u>map</u><u>,</u><u> </u><u>or </u><u>a </u><u>hasmap</u>

5 0
2 years ago
Read 2 more answers
Importancia de la química en la vida cotidiana​
maks197457 [2]

Answer:

chemistry is very important because everything you do is chemistry . our body is made up of chemicals . chemicals reactions occurs when be breathe ,eat , etc . All matter is made of chemicals so that chemistry is very important in our life

5 0
3 years ago
List the final state of the cache, with each valid entry represented as a record of &lt; index, tag, data &gt;.
yanalaym [24]
There is not enough information to give correct answer. Anyway, I guess, I've seen this question before and I know the answer. I wrote it in binary. So if your task's details look like this: tag bits 31-10 2; index bits 9-4; offset bits 3:0; your answer is:

<000000, 0001, mem[1024]>
<000001, 0011, mem[3088]>
<001011, 0000, mem[176]>
<001000, 0010, mem[2176]>
<001110, 0000, mem[224]>
<001010, 0000, mem[160]> 
8 0
3 years ago
Other questions:
  • The groups_per_user function receives a dictionary, which contains group names with the list of users. Users can belong to multi
    11·1 answer
  • Which presenter would most likely benefit from a custom slide show?
    10·2 answers
  • You are building a network and need to connect five computers in an office. They will be on the same network segment and you sho
    5·1 answer
  • What is application software? A computer language for accessing data in a database. A character string used to identify the loca
    10·1 answer
  • You entered the following line of code in IDLE.
    15·2 answers
  • Label provides the code that executes if no case label is matched ​
    6·1 answer
  • The function of while loop is
    14·1 answer
  • Advantages and disadvantages of java
    10·1 answer
  • Read each question below. Then, using the drop-down menus, decide if it represents the purpose, construction, or support aspect
    11·1 answer
  • Importance of folders on a computer <br>​
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!