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
xxMikexx [17]
3 years ago
13

1. Describe a linear search (explain how it works).

Computers and Technology
1 answer:
timurjin [86]3 years ago
7 0
1. A linear search searches on a straight path, hence the term “linear”. So a linear search would search from a one index to another in a straight path. For example, a linear search of an array, if given given the first and last index of the array, would search it one index after the other. First it would check index 0, then index 1, then index 2, and so forth.

2. A linear search can be useful if you are trying to find more than one instance of an value in a data structure. Since you want to search the whole array for each instance of the object or value.

3. A binary search only works with sorted data structures. It takes a data structure, finds its mid point, and checks I see if the value it is looking for is greater, less than, or equal to the midpoint value. If it is equal to the midpoint value, it’s finished and the search function is over.
If it’s greater than the midpoint, it disregards the lower half of the data structure and focuses on the upper half. If it’s less than the mid point then it disregards the upper half and focuses on the lower half.
It then repeats what it did at the beginning of the search function to again narrow down the amount of searching that needs to be done. In other words, if it disregarded the lower half of the data structure in the first part of the search, it finds the midpoint of the upper half of the data structure, checks to see if the value it’s looking for is greater than, less than, or equal to the midpoint. If it’s equal to it the searching is done, if it’s greater it disregards the lower half of the upper data structure, and repeats the process.
It will continue to do this until either the value is found or the value is not found.

4. You would use binary search if you are searching for one specific value in a sorted data structure.

5. A binary search must have a sorted data structure for it work.

6. Binary search is more efficient because the cost to run a binary search is substantially less than running a linear search.







You might be interested in
Which option is a form of an assistive technology?
nataly862011 [7]

Answer:

1

Explanation:

7 0
3 years ago
Alexandria works for a non-profit company that asks for donations to help the homeless people in her community. Recently the dat
Rudiy27

Answer:

A. PII

Explanation:

PII (Personally identifiable information) is any data that will be useful in identifying a particular individual e.g full name, date of birth, etc. A donors detail in the database will surely be the data to be used to identify him personally.

3 0
3 years ago
which cyber protection condition establishes a protection priority focus on critical and essential functions only
sergiy2304 [10]

INFOCON 1 is the cyber protection condition establishes a protection priority focus on critical and essential functions only.

INFOCON 1 describes the threat level system (defense system) that is used to defend against military attacks and is based fundamentally on the status of information systems i.e. on essential and critical functions of the system.

There are often five levels of INFOCON with INFOCON 1 being an acronym for "information operations condition 1" and is used in the United States of America and is carried out on attacks that were successful and could impact the missions of the Department of Defence and as such is only needed on occasions of extreme cyber risks.

In addition, INFOCON 1 describes the Computer Network Defense system at maximum alertness and any compromised systems in the network are completely isolated from the rest of the network to avoid further damage.

Learn more about cyber protection here: brainly.com/question/25157787?referrer=searchResults

 

3 0
3 years ago
Which is the most accurate description of which cell contains a nucleus
UNO [17]

Answer:

The nucleus is an organelle found in eukaryotic cells. Inside its fully enclosed nuclear membrane, it contains the majority of the cell's genetic material. This material is organized as DNA molecules, along with a variety of proteins, to form chromosomes.

7 0
3 years ago
PLSS HELP ASAP ILL GIVE BRAINLIEST THANKS
Margarita [4]

Answer:

span > : A generic container that can be used for styling specific portions of text.

6 0
3 years ago
Other questions:
  • You can deselect multiple selected sheets beginning with the sheet1 tab by pressing the ____ key and clicking the sheet1 tab.
    15·1 answer
  • Jasmine took many pictures at a photo shoot. She wants to transfer these pictures from her camera to her laptop for image enhanc
    10·2 answers
  • Most documents are printed in ______ orientation
    9·2 answers
  • Two words are a ""reverse pair"" if each is the reverse of the other. Write a program that finds all the reverse pairs in the wo
    12·1 answer
  • Ophelia is entering a Get Fit! sporting goods store in a shopping mall when her heel gets caught in a heating grate at the thres
    9·1 answer
  • Rewrite the following using if else statement:
    14·1 answer
  • Layers allow you to work with one element of an image without disturbing the others true or false​
    15·1 answer
  • (1101101)2 − (1001)2
    15·1 answer
  • Discuss the term internal control​
    12·1 answer
  • Online banking is a convenience that mostly affects which area of your life?
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!