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
zloy xaker [14]
3 years ago
12

When using the BinarySearch() method of an array or list type, what value is returned when the element is not found? How can we

decode this value and make use of it?
Computers and Technology
1 answer:
Step2247 [10]3 years ago
5 0

Answer:

When the element is not found we return -1.

Explanation:

When we use binary search we use BinarySearch() method of an array or list type when the element is found we return the index of the element if found if the element is not found we return -1.

We can decode this value since it is less than 0 and the indexing of arrays and lists starts with 0 upto the size-1.So -1 index is not present in the array or list.We have to check if the index is < 0 then the element is not present in the array or list.

for ex:-

if(index<0)

{

    System.out.println("Element is not present in the array");

}

You might be interested in
A ____ is a circuit board that contains most of a server.
8_murik_8 [283]
Motherboard






-------------------------------
6 0
3 years ago
Difference between multiterm access and single term access for webassign
NemiM [27]

The difference between single term access and multi term access is that multi-term access is for more than one term to courses using the same textbook edition and the Single term access<span> lasts for the duration of a Single  course in Web Assign. </span>

Multi-term access is also known as "Lifetime of Edition"

<span />
4 0
3 years ago
The 3rd generation programming language that most students learned when most computers used MS DOS was ___ . It remains a safe p
Diano4ka-milaya [45]

Answer:

Basic

Explanation:

The 3rd generation programming language that most students learned when most computers used MS DOS was basic. It remains a safe programming language for using 3rd party code and provides a coding standard that integrates easily with other programming languages.

7 0
4 years ago
What is online school like 3 sentences
lara [203]

Answer:

its okay. i mean like you have to do a bunch off stuff. andsomtimes it gets a little boring.

Explanation:

i am doing online school.

3 0
3 years ago
Read 2 more answers
Type the correct answer in the box. Spell all words correctly.
diamong [38]
The answer is handouts.
A handout is a pamphlet with information on your presentation you can give to your audience
8 0
3 years ago
Other questions:
  • In one sentences describe how to change your home page
    10·1 answer
  • Two different ways to bring up My Computer folder
    11·1 answer
  • Which function would you use to make sure all names are prepared for a mailing label?
    10·2 answers
  • Hi! I'm Kayla! I was wondering who does homework on the weekends... anybody?? I guess almost everyone, including me. Anyways, le
    13·2 answers
  • The master production schedule for Product A shows a need for 30 units, and Product B shows a need of 25 units. To manufacture a
    12·1 answer
  • True or false when a host gets an IP address from a DHCP server it is said to be configured manually
    15·1 answer
  • Benefits of computer in bank​
    5·1 answer
  • You dad has given you his old digital scanner for your new computer. you plug it into the usb drive on your windows 8 computer b
    8·1 answer
  • List and describe each of the activities of technology
    11·1 answer
  • the 4gl languages that enable nonprogrammers to use certain easily understood commands to search and generate reports from a dat
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!