If an element is present in an array of length n, how many element visits, on average, are necessary to find it using a linear search

Answers

Answer 1

Answer:

n/2

Explanation:

A linear search starts at the beggining of the array at index 0 and searches for the specific element by analyzing one element at a time. Meaning that if it does not exist in index 0 it moves to index 1 and if its not there it moves to index 2 and so on. If the element is not present in the array it finishes the array and ends, otherwise if it finds the element the search automatically ends. This means that on average the search would end early half of the time. This would mean that on average a total of n/2 elements are visited using a linear search.


Related Questions

Explain What Peer to Peer Networking is.

Answers

Answer:

peer to peer networking is like when joining together works

Help me why did my desktop erase every app I need that please

Answers

Answer:

Your computer is affected by a polymorphic or trojan horse virus, so install avast antivirus. Set your computer into safe mode, then open the antivirus

Answer:

your pc has virus

Explanation:

You upgrade your office graphics workstation with more memory. You replace two of the four inexpensive memory chips with expensive memory designed for workstations but now the system occasionally has memory issues. What could be the problem

Answers

Answer:

the two other inexpensive memory chips don't calibrate with the two expensive memory chips because they're not the same

Explanation:

Which is an example of machine-to-machine communication?
(Correct answer only)

A. talking to a friend
B. a computer connecting to a server
C. a computer doing statistical analysis
D. playing a video game
E. talking on the phone to a family member

Answers

Answer:

B Or C sorry Im not Sure

Explanation:

Machine-to-machine communication, or M2M, is exactly as it sounds: two machines “communicating,” or exchanging data, without human interfacing or interaction.

Answer:

B. a computer connecting to a server

Explanation:

Plz help help help


What was the first electromechanical digital computer?

For your kind information I would like to tell you that don't search on internet because it will show ENIAC and that is not the answer the answeris may be ABC or MARK I. I am just confused, Please help me

Answers

Explanation:

For your kind information the answer of the question is MARK I.

Answer:

What was the first electromechanical digital computer?

=⟩ Mark I was the first electromechanical digital computer.

Hope it helpful to you

tiền tệ ra đời là kết quả

Answers

bruuh, wht is this man saying

Money was born as a result?

Laser printer use a special powdered ink called?

Answers

If i am correct it is called toner!

Which of the following characterizes pooled interdependence? Multiple Choice Each member has a great deal of discretion in terms of what they do and with whom they interact while collaborating to accomplish the team’s work. Interaction in the team only occurs between members who perform tasks that are next to each other in a sequence. Members interact with a subset of other members to complete the team’s work. Group members complete their work assignments independently, and then this work is simply "piled up" to represent the group’s output. Different tasks are done in a prescribed order, and the group is structured such that the members specialize in these tasks.

Answers

Answer:

Group members complete their work assignments independently, and then this work is simply "piled up" to represent the group’s output.

Explanation:

A pooled interdependence arise or occurs when the members of a group are able to function with relative independence and then their combined output or level of productivity is used to significantly augment the group's overall performance.

A characteristic of pooled interdependence is that group members complete their work assignments independently, and then this work is simply "piled up" to represent the group’s output.

which computer is used in hospital for ultrasound?​

Answers

Answer:

Pentium Powered Computer

Explanation:

Pentium powered computer

What is the role of memory in a computer​

Answers

Answer:

Computer random access memory (RAM) is one of the most important components in determining your system's performance. RAM gives applications a place to store and access data on a short-term basis. It stores the information your computer is actively using so that it can be accessed quickly.

What combination of keys will autofill highlighted cells to the right?

Answers

Answer:

it is Ctrl+R            

how do i put pinned app to thr main screen​

Answers

Answer:

Go to the screen you want to pin.

Swipe up to the middle of your screen. ...

At the top of the image, tap the app's icon.

Tap the Pin .

why are GUI operating system more popular than CUI operating system these days?​

Answers

Answer

GUI operating system are more popular than CUI operating system because the GUI operating system is easy to use and understand because commands are graphically presented.They support extra devices and multimedia system.They support network and internet fully.They are multiuser,multitasking operating system.eg windows.

Explanation:

Hope it helps you

if ur computer is runing slowly what is most likey to slove the problem

Answers

One way to solve this problem is if you clear up some storage space. On my computer things were running very slowly and I checked my storage and it was beyond full. Another way would be to clean up your hard drive, run some virus and malware scans as your computer may have some viruses that would be slowing it down. Some others ideas are to download more memory on your computer, install a faster hard drive, and reinstall or upgrade your operating system. I hope this helps!!
Reboot the device or clear your cache. Maybe it may need to go to a shop as well and get a few parts switched out

Still giving out the brainly thing :)
just answer its as simple as that and you get points :)

Answers

Answer:

The answer to that my friend, Is 0 :D

Explanation:

Answer:

4/4

Explanation:

Tests of controls in an advanced computer system Can be performed using actual transactions or simulated transactions. Can be performed using only actual transactions because testing of simulated transactions is of no consequence. Is inadvisable because they may distort the evidence in master files. Is impracticable because many procedures within the computer processing activity leave no visible evidence of having been performed.

Answers

Answer:

Can be performed using actual transactions or simulated transactions.

Explanation:

Artificial intelligence (AI) also known as machine learning can be defined as a branch of computer science which typically involves the process of using algorithms to build a smart computer-controlled robot or machine that is capable of performing tasks that are exclusively designed to be performed by humans or with human intelligence.

Artificial intelligence (AI) provides smarter results and performs related tasks excellently when compared with applications that are built using conventional programming.

In an advanced computer system, test of controls can be performed using actual transactions or simulated transactions.

Tristen is teaching her history course. She printed off her presentation so the students could take notes. Wyatt is
teaching a science course. He wants to make sure students who do not have PowerPoint can still view the
presentation. Reed is teaching a math course online. He finds the students are very visual and wants to control the
timing per slide
Which best describes how each teacher handled their presentations?
O Tristen created handouts, Wyatt saved as a PDF, and Reed saved as a video
O Tristen created a video, Wyatt saved as a PDF, and Reed broadcasted.
O Tristen created handouts, Wyatt saved as a video, and Reed saved as a PDF.
O Tristen created a video, Wyatt broadcasted, and Reed saved as a video

Answers

Since Tristen want her students to take notes on her presentations, she should have some sort of handout.

Because Wyatt, wants to ensure that students who do not have PowerPoint can still view his presentations, converting it into a pdf is best.

Since Reed's students are very visual, converting his slides into a video will make it better for students who want to spend some time assessing some of the graphs or equations.

Thus, A is the best choice.

Express your opinion on whether a successful business analyst can be a good programmer. support your answers with reason

Answers

I think that a successful business analyst could be a good programmer because if they had the write training and experience they could learn about that field of work and become good at programming

[10 points] Write a program to compute the sum of digits in a number given by the user. You must use your own function to compute the sum of digits.

Answers

Answer:

I am going to write the program using BASIC PROGRAMMING

Explanation:

10 PROGRAM TO CALCULATE SUM OF DIGITS

20 INPUT B,H,T,G

30 LET Y = B+H+T+G

40 PRINT Y

DO THIS ON BASIC PROGRAMMING AND YOU HAVE YOUR PROGRAM

1. Answer the following questions: a. What are the different types of number system? Name them.​

Answers

Answer:

binary,decimal, hexadecimal and octal number system

monitor is hard copy output device??
false
true​

Answers

Answer:

false

Explanation:

monitor is an output device but not hard copy. Hard copy is paper

What are the three major tasks does a computer perform?​

Answers

Ans:

Input, processing, and output.

The three major tasks a computer performs are Input, processing, and output.

What are the tasks of a computer?

These tasks exist all connected to the four basic computer functions: input, output, processing, and storage.

Taking data and instructions from a user, processing the data as per instructions, and showing or storing the processed data, exist the four main functions of a computer.

To learn more about computer

https://brainly.com/question/24540334

#SPJ2

After a recent breach, an organization determined that phishing was used to gain initial access to the network before regaining persistence. The information gained from the phishing attack was a result of users visiting known malicious websites. What must be done in order to prevent this from happening in the future

Answers

Answer:

The organization could make it so that specific websutes that seem fake/unsafe are not accessible to the users. For example, downloading an extension into all the devices, that blocks these malicious websites (uBlock Origin)

The program prompts the user for five to ten numbers all on one line, separated by spaces, calculates the average of those numbers, and displays the numbers and their average to the user.

The program uses methods to:

1) get the numbers entered by the user all on one line separated by spaces;

2) calculate the average of the numbers entered by the user; and

3) print the results.

The first method should take no arguments and return a String of numbers separated by spaces.

The second method should take a String as its only argument and return a double (the average).

The third method should take a String and a double as arguments but have no return value.

IF user input is: 20 40 60 80 100

Answers

Answer:  

import java.util.Scanner;  

public class AverageDemo

{  

public static String getNumbers()

{

 

 String numbers;  

 Scanner scn = new Scanner(System.in);  

 System.out.println("Enter five to ten numbers all on one line, separated by spaces: ");

 numbers = scn.nextLine();

 return numbers;

}  

public static double calcAverage(String numbers)

{

 String[] values = numbers.split(" ");

 double total = 0;  

 for (int i = 0; i < values.length; i++)

 {

  total += Integer.parseInt(values[i]);

 }  

 if (values.length == 0)

  return 0.0;

 else

  return (total / values.length);

}  

// Method definition of printResults: print the results

public static void printResults(String numbers, double average)

{

 System.out.printf("\nThe average of the numbers %s is %.2f\n", numbers, average);

}  

// main method

public static void main(String[] args)

{

 // Call the methods

 String numbers = getNumbers();

 double average = calcAverage(numbers);

 printResults(numbers, average);

}

}

Output:

The number of swappings needed to sort the number 8, 22, 7, 9, 31 in ascending order, using bubble sort is

Answers

Answer:

3

Explanation:

swap the 7 with the 22

swap the 7 with the 8

swap the 9 with the 22

Aarti, a museum employee, has created a table in access titled “Roman Achitecture”. She has included a field that links users images of buildings.

Answers

Answer:

memo

Explanation:

Aarti, a museum employee, has created a table in access titled “Roman Achitecture”. She has included a field that links users images of buildings

Abdullah wants to send sessitive data. Abdullah wants to make sure that only ahmed can see and read this. How can abdullah protect this data, so that ahmed can only access it. By using this information make an algorithm.

Answers

Answer:

Use an encryption algorithm

Explanation:

An encryption algorithm can be used to hide the message from parties in-between or any third parties that might want to intercept the message being sent by Abudullah to Ahmed.

Encryption algorithms use cryptographic methods to encrypt or code data such that only the sender and receiver of that data have the keys to properly decode/decrypt these messages/data.

why are laptop employment of computer popular these days​

Answers

Answer:

Because due to pandemic all the offices and employment sector are closed physically and to make their work smoothly people are preferring virtual platforms with the concept of work from home .

I hope it is helpful and mark me as brainlest and follow me plllzzz♥️♥️

c. Compare Mainframe and Minicomputers with their key features



plzzz help ​

Answers

Answer:

Mainframe computer:

The size of the disk is large.

They have large memory storage.

The speed of processing is fast in comparison to minicomputer.

They are more expensive.

Minicomputer:

The size of disk is small.

They have less memory storage in comparison to mainframes.

Their processing speed is less in comparison to mainframes.

It is not as expensive as mainframes.

Explanation:

I hope this will help you

Which of these optical devices is fairly fragile, easy to snap or scratch

1. Flash memory
2. Magnetic tape
3. CD
4. Hard disk​

Answers

Answer:

CD

Explanation:

The optical device that is fairly fragile and easy to snap or scratch is called; 3: CD

How to identify optical devices?

An optical instrument is a device that processes light waves either to enhance an image for viewing or to analyze and determine their characteristic properties.

Now, from the given examples, they all come with protective covers except for the CD. Thus, the CD is the most fragile because it can easily be scratched or snapped.

Read more about Optical Devices at; https://brainly.com/question/23391790

#SPJ9

Other Questions
Read these sentences from the excerpt:What he most dreaded, that I most desired. What he most loved, that I most hated. That which to him was a great evil, to be carefully shunned, was to me a great good, to be diligently sought; and the argument which he so warmly urged, against my learning to read, only served to inspire me with a desire and determination to learn.Why does the author use parallel structure to advance his purpose?to give more information about the claim that reading and writing are necessary for freedomto show the need for slaves and slaves owners to come together to end slaveryto explain why the author disagrees with slave owners about many different issuesto underscore the author's realization that reading and writing are important skills for gaining freedom What is the enthalpy change, AH, for this reaction? Show your work to receive full credit. URGENT PICTURE INCLUDED !!! Question 15 of 20What is migration?A. Using trains to carry trade goods from place to placeB. The movement of people from one place to anotherC. The movement of products from one place to anotherD. The use of machines to make travel easier Understanding how and why the South differs from New England culturally, economically, and politically is an example of regional analysis. Help ASAP only right answers only no spam dont answer if you dont know Which of the following is NOT part of creating an outline for your essay? A. Find places to include your personal opinion. B. Make notes of relevant quotes you wish to use. C. Create the main points you want to discuss. D. Consider what structure will be the most effective for your project. If f(x)=5x and g(x)=2x-1, what is the composition f(g(x))? Find the slope of the line that passes through (1, 2) and (8, 8). Coloque las comas que ameriten. Estoy alegre Vanesa por el regalo que me diste En el armario coloco la vajilla en el cajon los cubiertos en los estantes los vasos El perro el gato y el ratn son animales mamiferos Espero Diego que hayas hecho tu parte del trabajo como te comprometiste Mi compaero de trabajo de poca experiencia y algo irresponsable falto varios dias Which of the following is NOT TRUE about food irradiation?O It is practiced around the world.O It leaves food mildly radioactive.It is effective in killing microorganisms.o It destroys microorganisms without cooking. which statement proves that polygon ABCD is not a rectangle What tissue work together to form muscles? Jeremy is a securely attached infant; Jason is classified as an insecure infant. Which of the following statements about later functioning for these children is TRUE?a. There will be no differences in their social functioning by the age of eight.b. Jason is more likely than Jeremy to be more dependent on teachers in primary school.c. Jeremy is likely to be more shy and withdrawn than Jason.d. Jeremy is more likely than Jason to develop low self-confidence. find the slope of the line that contains (6,2) and (6,-3) m-2n = 8n = m - 2The value of m in the system of equations is: Plz help me asapplz plzi will give u brainliest plz asap plz plz Calculate the distance travelled by the car in part Q use the equation distance travelled= average speed x time Which artifact would best symbolize freedom for Americans Given the following numbers: a = 12500000 b = 0.00125 c = 1120000 Calculate (ab) (c) and write the answer in standard form. (2.5 marks)d) Express the interval (-1.5, 4] as an inequality and then graph the interval. what the volume of a sphere with a diameter of 21.4 dm?