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]
2 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]2 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
Write a 2 paragraph on an African American who has become successful in IT. Need help asap can’t think of anything
Katen [24]

Answer:

wait you need 2 paragraphs on an african american that became sucessful in what? please clear this up so that i can help you

Explanation:

5 0
2 years ago
Write a application that can determine if a 5 digit number you input is a palindrome. If the number is a palindrome then print "
notsponge [240]

Answer:

Written in Python:

num = int(input("Number: "))

strnum = str(num)

if len(strnum) !=5:

    print("Length must be 5")

else:

    if(strnum[::-1] == strnum):

         print("The number is a palindrome.")

    else:

         print("The number is NOT palindrome.")

Explanation:

This prompts user for input

num = int(input("Number: "))

This converts user input to string

strnum = str(num)

This checks the length of the string

if len(strnum) !=5:

    print("Length must be 5") If length is not 5, this prompt is printed

else:If otherwise

    if(strnum[::-1] == strnum): The compares the string reversed with the original

         print("The number is a palindrome.") If both are the same, this line is executed

    else:

         print("The number is NOT palindrome.") If otherwise, this line is executed

4 0
3 years ago
The ________ utility automatically creates duplicates of your libraries, desktops, contacts, and favorites to another storage lo
umka21 [38]

Answer: File History

Explanation: File history is the history that gets created in the form of back-up that keeps the record of the stored files. It is used in protecting the files  that is present on the system like desktop, libraries,etc.

It creates the duplicate records in the storage for any future use and it can also be restored easily.File history also facilitates with feature of deleting the unnecessary history afterward when the user wants.

6 0
2 years ago
What when can you expect technology to be effective?
loris [4]

Answer:

we dont have to expect , the technology are effective , as each day the technology are being advance and developed day by day. each day the technology are being more and more effective. they are effective now and they will be effective in future too

3 0
2 years ago
I really want to know the best way to deal as much heart as possible plz tell me
Natasha2012 [34]

Answer:

Set aside time every day for doing something that feels positive, whether that’s journaling, meeting up with a close friend, or watching a show that makes you laugh. Scheduling in moments that bring you joy is vital for healing a broken heart. It’s important to talk about your feelings with others and not numb yourself out.

Explanation:

7 0
2 years ago
Read 2 more answers
Other questions:
  • The concept of vertical farming allows agriculture to occur when there is not enough___Available .
    13·1 answer
  • What is used for World Wide Web?
    7·1 answer
  • A router is a device that addresses a packet on a network to the next router along the line. Under which layer of the OSI model
    5·1 answer
  • In general terms, a program that is broken into smaller units of code such as methods, is known as a ________
    6·1 answer
  • People using commercially available software are usually asked to read and agree to a(n) _____
    10·1 answer
  • Integer indexing array: Weekend box office The row array movieBoxOffice stores the amount of money a movie makes (in millions of
    11·1 answer
  • . Select the advantages of RAID-5 relative to other RAID schemes. (MAY SELECT MULTIPLE)
    7·1 answer
  • Which of the following statements are true?
    13·1 answer
  • How do you think electronic spreadsheets have transformed businesses today?​
    6·1 answer
  • Greenpeace used "Mister Splashy Pants" to:
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!