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
Ivanshal [37]
4 years ago
10

g Given an array, the task is to design an efficient algorithm to tell whether the array has a majority element, and, if so, to

find that element. The elements of the array are not necessarily from some ordered domain like the integers, and so there can be no comparisons of the form "is A[i] ≥ A[j]?". (Think of the array elements as GIF files, say.) However you can answer questions of the form: "is A[i] = A[j]?" in constant time
Computers and Technology
1 answer:
AnnZ [28]4 years ago
4 0

Answer:

If there is a majority element in the array it will be the median. Thus,

just run the linear time median finding algorithm, and compare the result with all the  elements of the array (also linear time). If \frac{n}{2}elements are the same as the median, the  median is a ma majority element. If not, there is none.

Suppose now that the elements of the array are not from some ordered domain like the  integers, and so there can be no comparisons of the form "is the ith element of the array  greater than the jth element of the array?" However you can answer questions of the  form:

"Are the ith and jth elements of the array the same?" in constant time. Such

queries constitute the only way whereby you can access the array. (Think of the elements  of the array as GIF files, say.) Notice that your solution above cannot be used now.

You might be interested in
What is the process called that occurs when you start up your computer? A Download B Restore C Boot D Copy
pickupchik [31]

C) Boot is your answer

You have to boot up your computer first before you can do any of the others.

It is not A), because you have to already have started the computer before you can download

It is not B), because this only happens if your computer gets malware or viruses

It is not D), because copying has nothing to do with booting your computer.

hope this helps

8 0
3 years ago
Read 2 more answers
Consider the eight bit signed binary number 1110 0101. Convert it to signed decimal from assuming the signed binary number is re
alukav5142 [94]

Answer:    -26

Explanation:

We have:  1 1 1 0   0 1 0 1

Since it’s one’s complement representation, then we check the very first digit to state if the number is negative or positive. Since the very first digit to the left is 1, then the number will be negative.

When it is negative, we now flip the bits, so that we get:

0 0 0 1   1 0 1 0

Notice we just turn the 1’s into 0’s and vice versa.

We now convert this binary into decimal:

We assign to each digit the corresponding power of 2.  

See it in a table:

\begin{matrix}0&0&0&1&1&0&1&0\\2^7&2^6&2^5&2^4&2^3&2^2&2^1&2^0 \end{matrix}

Then multiplying each digit by its corresponding power of 2 and then adding the results, we get:

2^4+2^3+2^1

We get:

16+8+2=26

Since we stated that the number is negative, then, the final result is: -26

4 0
3 years ago
A highly available server is available what percentage of the time?
Verdich [7]

Answer:

b. 99.99%

Explanation:

<u>High available server</u>

A typical dedicated server is a strong machine linked to a high-speed Internet connection and located in a state-of - the-art distant data center or optimized information warehouse.

A dedicated High Availability Server is an sophisticated system with redundant network,redundant power supplies and backups to ensure maximum up-time.

5 0
3 years ago
A general-use dimmer switch is required to be counted as ? where installed in a single-gang box on a circuit wired with 12 awg c
aleksandrvk [35]

Answer:

2 conductors.

Explanation:

A dimmer switch is an electrical switching or control device used to control the power or voltage to a compatible dimmer bulb.

It reduces the ambience if light bulbs by uniformly increasing the resistance of the switch when the knob is rotated to a lesser point. It is a circuit breaker as two conductors are connected to its terminals and a variable voltage resistor determines the flow of current between them.

3 0
4 years ago
How have productivity programs improved the professional lives of people? (check all that apply)
Zielflug [23.3K]

Productivity programs improved the professional lives of people because:

  • made it easier and faster to communicate with others
  • made it easier to manipulate numbers in a spreadsheet
  • made it easier and less expensive to present information

<h3>What is productivity?</h3>

Productivity is known to be the level of efficiency in regards to the production of goods or services and it is one that is rated by some measure.

Hence, Productivity programs improved the professional lives of people because:

  • made it easier and faster to communicate with others
  • made it easier to manipulate numbers in a spreadsheet
  • made it easier and less expensive to present information

Learn more about productivity from

brainly.com/question/14262252

#SPJ1

7 0
2 years ago
Other questions:
  • How can I get more Gems in the game {Fashion Empire} through a Fire kindle?
    15·2 answers
  • What is the device that allows users to manipulate data by controlling an onscreen pointer
    5·2 answers
  • Nonvolatile in the context of data storage means ________________. a. the data can't be changed in a data warehouse. b. the data
    11·1 answer
  • Markup is best defined as
    11·1 answer
  • Can you find the ip address from a physical address
    13·1 answer
  • When evaluating portable CD players, you consider price, the sound quality, and ease of using the controls. These are your _____
    8·2 answers
  • We want to make a row of bricks that is goal inches long. We have a number of small bricks (1 inch each) and big bricks (5 inche
    5·1 answer
  • Send me the answers<br>​
    15·1 answer
  • How to make a computer
    14·2 answers
  • A file named "games.txt" exists and has 80 lines of data. You open the file with the following line of code.
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!