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
The labels button is found under the
atroni [7]
I believe it is the Mailings tab
4 0
3 years ago
Read 2 more answers
TRUE OR FALSE, databases allow you to search for content on the internet based on certain criteria (PLS ANSWER RIGHT)
tester [92]

I'm pretty sure the answer is true. If the criteria it means is like the text you search and the like, then it's true. If this helped, please give me brainiest!

7 0
3 years ago
Read 2 more answers
O novo funcionário da equipe de desenvolvimento de sistemas está aprendendo os termos mais utilizados no dia a dia da empresa. A
ratelena [41]

<span>Os insetos são insetos</span>
3 0
3 years ago
The most efficient way to perform data entry is to keep your hands on the keyboard and press _______ to move to the next cell in
SCORPION-xisa [38]
The correct answer is C. Tab; enter
5 0
3 years ago
Which of the following common software packages would help a business
Jobisdone [24]

Answer:

D. Spreadsheets

Explanation:

While A also seems correct, a spreadsheet is best at collecting and organizing data. Databases would only store data while a spreadsheet would keep those records, as well as help calculate a budget or payroll.

3 0
2 years ago
Other questions:
  • What are the differences between levels 1, 2 and 3 cache memoroes??
    8·1 answer
  • Write a program that takes as input an arithmetic expression followed by a semicolon ";". The program outputs whether the expres
    11·1 answer
  • which of the following is a malicious program that can replicate and spread from computer to computer? A. Email B. Virus C. Spam
    15·1 answer
  • How can an Excel table be added to a Word document? Check all that apply.
    15·1 answer
  • True or false questions:
    11·1 answer
  • What is a Hard Drive
    13·1 answer
  • What is the role of science and technology in achieving human’s ultimate goal or the good life?
    8·2 answers
  • A photographer stores digital photographs on her computer. In this case the photographs are considered the data. Each photograph
    6·1 answer
  • 1. Write a statement that opens the file Customers.dat as a random access file for both reading and writing.
    9·1 answer
  • What Microsoft feature enables you to represent text as colorful visuals
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!