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
Kaylis [27]
2 years ago
15

An array similar to a phone book has 1000 names arranged as names [0], names[1]....names[999]. Nancy wants to search a name X in

this array. Which of the following preconditions must she ensure to perform a binary search?
a. The list has a large number of names.
b. The name X is present in the list.

In addition to the two statements above, which of the following is correct?

a. There should be no duplicates in the list.
b. The names in the list should be alphabetical order.
c. The name X should occur near the middle of the list.
Computers and Technology
1 answer:
sammy [17]2 years ago
5 0

Answer:

b. The names in the list should be in alphabetical order.

Explanation:

A binary search is an algorithm used for searching for an item in a list or array. The algorithm first sorts the data structure into order and then divides it into halves. If the searched item is less than the middle item in the list, then the algorithm searches for the target in the first half, else, in the second half. This reduces the time complexity of the search.

You might be interested in
What are the top and side margins for a letter typed in standard format?
BabaBlast [244]
Should be 1’ on each side
4 0
3 years ago
How does beamforming improve network service?
fenix001 [56]

Beamforming can improve network service by using device locations to better target service signals.

This is because, beamforming helps to deliver higher signal quality to the target receiver.

<h3>What is beamforming?</h3>

beamforming can be regarded as application of different radiating elements that is transmitting the same signal.

This signal is usually identical in wavelength and phase, and  by reinforcing the waves in a specific direction the goal can be acheived.

Learn more about beamforming at:

brainly.com/question/12809344

7 0
2 years ago
The linux and macos program traceroute is known by a slightly different name on windows. it's referred to as ______.
kompoz [17]

The answer is 'tracert'. Tracert or traceroute command is a form of a diagnostic tool which allows you to capture information as the packet is sent from the source and destination providing the route taken and measure of delay across the IP network.

7 0
2 years ago
Use the STL class vector to write a C function that returns true if there are two elements of the vector for which their product
Tema [17]

Answer:

Code is provided in the attachment form

Explanation:

Vector Multiplication code:

Vector_multiplication.c file contains C code.

See attachment no 1 attached below

Classification of Algorithm: For creating elements in vector c of size n, number of scalar  multiplications is equal to n. The size of original two vectors scales directly with the number of  operations. Hence, it is classified as O(n).

7 0
3 years ago
) Consider a router that interconnects four subnets: Subnet 1, Subnet 2, Subnet 3 and Subnet 4. Suppose all of the interfaces in
erik [133]

Answer:

Check the explanation

Explanation:

223.1.17/24 indicates that out of 32-bits of IP address 24 bits have been assigned as subnet part and 8 bits for host id.

The binary representation of 223.1.17 is 11011111 00000001 00010001 00000000

Given that, subnet 1 has 63 interfaces. To represent 63 interfaces, we need 6 bits (64 = 26)

So its addresses can be from 223.1.17.0/26 to 223.1.17.62/26

Subnet 2 has 95 interfaces. 95 interfaces can be accommodated using 7 bits up to 127 host addresses can represented using 7 bits (127 = 27)

and hence, the addresses may be from 223.1.17.63/25 to 223.1.17.157/25

Subnet 3 has 16 interfaces. 4 bits are needed for 16 interfaces (16 = 24)

So the network addresses may range from 223.1.17.158/28 to 223.1.17.173/28

4 0
3 years ago
Other questions:
  • Write a MIPS program to continuously generate the following series of integers: 1, 2, 3, 6, 9, 18, 27, 54, 81, and so on. Use st
    13·1 answer
  • An employee who interacts with customers regarding the nature of their car problems, rather than actually working on the vehicle
    12·2 answers
  • The TabIndex value assigned to a text box's identifying label must be _______________ for the text box's access key to work corr
    14·1 answer
  • In each iteration, selection sort (small) places which element in the correct location?
    9·1 answer
  • sqrt is being defined as a variable name, how do I get its math function to... well... function? (Python)
    11·1 answer
  • You have just finished upgrading the 250 w power supply in your desktop computer to a 450 w power supply. now the bios doesn't r
    7·1 answer
  • Ew<br>subject: Computer<br>11101÷101<br> binary operations<br>​
    7·1 answer
  • Select the correct answer. Which sign or symbol will you use to lock cells for absolute cell reference?
    9·2 answers
  • TRUE OR FALSE:
    6·1 answer
  • PLEASE HELP! I accidently looked up a link, and now this same link keeps popping up everywhere, how do I stop this!?!? please he
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!