Questionalgorithm secreta0n - 1input an array a0n - 1 of n

Assignment Help Computer Engineering
Reference no: EM13349156

Question

Algorithm Secret(A[0..n - 1])
//Input: An array A[0..n - 1] of n real numbers
minval ← A[0]; maxval ← A[0]
for i ← 1 to n - 1 do
if A[i] < minval
minval ← A[i]
if A[i] > maxval
maxval ← A[i]
return maxval - minval

a. What does this algorithm calculate?

b. What is its essential operation?

c. How many times is essential operation executed?

d. What is the effectiveness class of this algorithm?

e. propose a development or a better algorithm altogether and indicate its effectiveness class. If you cannot do it, try to prove that, in fact, it cannot be completed.

Reference no: EM13349156

Questions Cloud

Questionwrite down python program that will read list of : questionwrite down python program that will read list of temperatures from a data file you created called tempfile.txt
Question 1 the origin of social policy is closely linked to : question 1 the origin of social policy is closely linked to the establishment of the fabian society in uk. in mauritius
Question1 images can be stored as lossless or lossy bitmaps : question1. images can be stored as lossless or lossy bitmaps. explain differences why are most photographic images
Question1 write down an sql statement to show tables owned : question1. write down an sql statement to show tables owned by user newyear. 2. write down an sql statement to show the
Questionalgorithm secreta0n - 1input an array a0n - 1 of n : questionalgorithm secreta0..n - 1input an array a0..n - 1 of n real numbersminval larr a0 maxval larr a0for i larr 1 to
Questiongenerate and display all 52 cards in a standard : questiongenerate and display all 52 cards in a standard deck of playing cards 2-10 j k q a of hearts diamonds clubs and
Questiona assume a computer has a maximum memory size of : questiona assume a computer has a maximum memory size of 4mb. what is essential address field width?b assume a computer
Questionwrite down an application that reads 3 integers : questionwrite down an application that reads 3 integers adds all 3 together and computes an average of the 3 entries
Question1 demonstrate your understanding of it : question1 demonstrate your understanding of it infrastructure by answering following questions -a what characteristic

Reviews

Write a Review

Computer Engineering Questions & Answers

  Discuss pros of using automated testing tools

Why do so many in-house applications never get finished.

  What repetition control structure is used in java

How may easy to read or highly documented code become a security risk?

  Write a program that inputs an integer for n

Write a program that inputs an integer for n, iterates through the Babylonian algorithm twenty times, and outputs the answer as a double to two decimal places. Your answer will be most accurate for small values of n.

  Questionassume you want to deposit a certain amount of

questionassume you want to deposit a certain amount of money into a saving account and after that leave it alone to

  Questiona i what are the main differences give three for

questiona i. what are the main differences give three for each between message-passing and shared-address-space

  Define the layers of the international organization

The layers of the International Organization for Standardization-Open Systems Interconnection (ISO-OSI) model.

  Assume f is a function

assume f is a function that returns the result of reversing the string of symbols given as its input, and g is a function that returns the concatenation of the two strings given as its input. If x is the string abcd, what is returned by g(f(x),x).

  Make a function definition called backward

build a function definition called backward, with three parameters, the first and second parameters are arrays of integers of equal size and the third is an integer indicating the size of each array.

  Three concerns dealing with internet security and privacy

identify and define three concerns dealing with Internet security and privacy?

  Ip cameras to improve security for devry university

IP cameras to improve security for DeVry University.

  Identify the class boulesurprise

Identify the class BouleSurprise.

  What does algorithm compute eciency

What does algorithm compute - what is its basic operation and how many times is the basic operation executed?

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd