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
Nataly [62]
3 years ago
15

The range of a finite nonempty set of $n$ real numbers $S$ is defined as the difference between the largest and smallest element

s of $S$. For each representation of $S$ given below, describe an algorithm in pseudo code to compute the range. Indicate the time efficiency classes of these algorithms using Big-$O$.
Computers and Technology
1 answer:
-Dominant- [34]3 years ago
7 0

Answer: Hello your question is poorly written attached below is the well written question

answer:

a) Determine ( compute ) the difference between the max and minimum value. determine the Min and max values using 1.5n comparisons

  time efficiency = θ( n )

b) A(n-1) - A(0)

  time efficiency = θ( 1 )

Explanation:

a) An unsorted array

To find the maximum and minimum values scan the array of elements , then determine ( compute ) the difference between the max and minimum value. to determine the range. Alternatively determine the Min and max values using 1.5n comparisons

Algorithm's time efficiency = θ( n )

b) A sorted array

To determine the range, we will determine the difference between the first and last element i.e. A(n-1) - A(0)

time efficiency = θ( 1 )

You might be interested in
The specific instructions that a computing device needs to boot up and control the hardware
dlinn [17]

Answer:

Firmware

Explanation:

7 0
3 years ago
Complete the following:_____
alexira [117]

Answer:

The answer to the give question as follows:

1) \n

2) \t

3) \'

4) \"

5) \\

Explanation:

The description of the above symbols as follows:

  • The \n is used to provide the new line spacing.
  • The \t is used to provide a tab space.
  • To assign a single character value we use \' single.
  • The double \" quote is used to assign a string value.
  • The backslash is used to provide the character of the escape and it also used in a file path.
7 0
3 years ago
A(n) __________attack is designed to render the target unreachable by legitimate users, not to provide the attacker access to th
Nimfa-mama [501]
Denial of Service or Distributed Denial of Service.
3 0
3 years ago
Put the following numbers in order from greatest to least:
monitta
Negativ numbers no matter how big, will always be less than zero. The correct Answer is A) 45,15,0,-11,-37
3 0
3 years ago
Which administrative tool can you use to check your computer's health or troubleshoot problems with the operating system or soft
Fiesta28 [93]

Answer:

performance monitor

Explanation:

7 0
3 years ago
Read 2 more answers
Other questions:
  • Prior to the development of e-commerce, web sites primarily delivered static html pages. true
    11·1 answer
  • PLEASE HELP
    6·1 answer
  • Each device attached to your computer comes with a special program called a(n ________ that enables the device and operating sys
    15·1 answer
  • A class is a _____, which encapsulates _____ and _____. (Points : 2) programming language construct; attributes; behavior
    7·1 answer
  • Which of the following is an algorithm?
    15·2 answers
  • LaShawn would like to post photos in a social media app, but the program needs to be modified in order to display a greater vari
    12·2 answers
  • A mobile application delivers market predictions based on stock data from the stock market data platform. Knowing that the data
    12·1 answer
  • Jim is working on a network design for a small office running a Windows file and printer server with Internet
    15·1 answer
  • Where is the flash drive listed in a windows 7 save as dialog box?
    9·1 answer
  • Name various input and output devices used with computers.
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!