answer.
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
just olya [345]
2 years ago
4

Suppose that L is a sorted list of length 1000. To determine whether an item is in L, the maximum number of comparisons executed

by the binary search algorithm, as discussed in this book, is ____.a. 1b. 42c. 500d. None of these
Computers and Technology
1 answer:
Rainbow [258]2 years ago
7 0

Answer:

a. 1

Explanation:

The length of the array is 1000 named as L.

If we want to find the element from thousand digits using Binary search algorithms, because in binary search we divide the array in two equal parts. After dividing array in two parts, we find that whether the element is in first half or 2nd half.

<em>In Above example the we don't have a specific element that we should compare, so in general only with help of first comparison we find that in array L having 1000, in which half the element is found. As the array divides in 2 parts it should not be named as L having size 1000.</em>

<em></em>

So only comparison is required to find that, the element is in which part of array L.

You might be interested in
Make a class Employee with a name and salary. Make a class Manager inherit from Employee. Add an instance variable, named depart
sweet [91]

Answer:

see explaination

Explanation:

class Employee

{

String name;

double salary;

void tostring()

{

System.out.println("Employee:\nName: "+name+"\nSalary: "+salary+"\n");

}

Employee(String n,double s)

{

name=n;

salary=s;

}

}

class Manager extends Employee

{

String department;

void tostring()

{

System.out.println("Manager:\nName: "+name+"\nDepartment: "+department+"\nSalary: "+salary+"\n");

}

Manager(String n,double s,String d)

{

super(n,s);

department=d;

}

}

class Executive extends Manager

{

void tostring()

{

System.out.println("Executive:\nName: "+name+"\nDepartment: "+department+"\nSalary: "+salary+"\n");

}

Executive(String n,double s,String d)

{

super(n,s,d);

}

}

public class test

{

public static void main(String args[])

{

Employee e =new Employee("Neo",12000);

e.tostring();

Manager m =new Manager("Cramster",100000,"Homework");

m.tostring();

Executive ex =new Executive("Chuks",1000000,"Homework");

ex.tostring();

}

}

8 0
2 years ago
Write a copy constructor for carcounter that assigns origcarcounter.carcount to the constructed object's carcount. sample output
Drupady [299]

#include <iostream>

using namespace std;

class CarCounter {

  public:

     CarCounter();

     CarCounter(const CarCounter& origCarCounter);

     void SetCarCount(const int count) {

         carCount = count;

     }

     int GetCarCount() const {

         return carCount;

     }

  private:

     int carCount;

};

CarCounter::CarCounter() {

  carCount = 0;

  return;

}

CarCounter::CarCounter(const CarCounter &p){

carCount = p.carCount;

}

void CountPrinter(CarCounter carCntr) {

  cout << "Cars counted: " << carCntr.GetCarCount();

  return;

}

int main() {

  CarCounter parkingLot;

  parkingLot.SetCarCount(5);

  CountPrinter(parkingLot);

  return 0;

}

Sample output:  

Cars Counted: 5

8 0
2 years ago
Read 2 more answers
In a situation where handicapped person can only input data into the computer using a stylus or light pen, which keyboard config
asambeis [7]
I think the best one is voice recognition keyboards.


Would perfect work there



Mark as brainliest
8 0
2 years ago
Read 2 more answers
The base class Pet has private fields petName, and petAge. The derived class Dog extends the Pet class and includes a private fi
Lapatulllka [165]

Answer:

Hello attached is the Java program written to solve the problem

The Pet.java and Dog.java files are unaltered

Explanation:

The input and output  codes are attached as well i.e the second image is the input while the third image is the output code

5 0
2 years ago
A user complains that her computer is performing slowly. She tells you the problem started about a week ago when new database so
k0ka [10]

Answer:

Option (B) is the correct of this question.

Explanation:

The performance of a monitor and process counters to observe the performance is the tool or method which determines the new software is hogging the computer resources. So this way the user don't have any problem with computer.

  • You can view log files in Windows Performance Monitor to see a visual representation of the performance counter data.
  • Performance counters are bits of code that log, count, and measure software events that allow a high-level view of user trends.
  • To customize the tracking of AD FS output using the Quality Monitor.
  • Type Output Monitor on Start screen, then click ENTER.
  • Expand Data Collector Sets in the console tree, right-click on User Specified, point to New, then select Data Collector Collection.

Other options are incorrect according to the given scenario.

4 0
2 years ago
Other questions:
  • What infrastructure model provides access to shared computing resources over a network, often the internet?
    13·1 answer
  • Jail and prison officials may generally limit inmate rights when the limitations serve
    13·2 answers
  • Tina reported a safety hazard at her workplace to OSHA. Representatives from OSHA
    5·1 answer
  • Write a program named SortWords that includes a method named SortAndDisplayWords that accepts any number of words, sorts them in
    10·1 answer
  • Given a positive integer, output its complement number. The complement strategy is to flip the bits of its binary representation
    6·1 answer
  • Which statement about dialogues is NOT correct? Select one: A. Users should be able to control the direction of speed of dialogu
    5·1 answer
  • PC’s &amp; More has shifted to sales and service of laptops and PCs, where it has the potential to triple the number of its cust
    14·1 answer
  • 2 Name the package that contains scanner class?​
    10·1 answer
  • reAay ouyay aay hizway ithway igPay atin?Lay? (Translated: "Are you a whiz with Pig Latin?") Write a program that converts an En
    6·1 answer
  • 5.14 ◆ Write a version of the inner product procedure described in Problem 5.13 that uses 6 × 1 loop unrolling. For x86-64, our
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!