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
tresset_1 [31]
2 years ago
9

Performing binary search on an unsorted list will always return the correct answer in O(n) time where n is the length of the lis

t.
a) true
b) false
Computers and Technology
1 answer:
marissa [1.9K]2 years ago
5 0

Answer:

B. False

Explanation:

Binary search does not work in an unsorted list, therefore it will not return the correct answer in 0(n) time.

For an unsorted list, linear search is the better way of searching for algorithms.

For a binary search, it goes through a sorted list to locate a desired element. It repeats its processes until it picks the correct element it is looking for.

You might be interested in
In its simplest form, communication is defined as ________.
kykrilka [37]

Answer: c)-the transmission of information and meaning from a sender to a receiver

Explanation: Communication is describes as the transmitting the information along with meaning from source to destination. The source is sender from where the information is sent and receiver is the destination unit to receive  the information .Information that is being sent contains structured, organized and meaningful facts and figure.

Other options are not appropriate because information and meaning both are transferred in communication ,data is not transferred in communication as they are raw and unstructured facts and ideas are not conveyed in communication.Thus, the correct option is option(c).

5 0
1 year ago
The establishment called ABC Enterprise requires a Java program to keep a database of the inventory of the products that it sell
Alexandra [31]

Answer:

// GetData.java

import javax.swing.JOptionPane;

public class GetData

{

  public static double getDouble(String s)

  {

      return Double.parseDouble(getWord(s));

  }

  public static int getInt(String s)

  {

      return Integer.parseInt(getWord(s));

  }

  public static String getWord(String s)

  {

      return JOptionPane.showInputDialog(s);

  }

  public static String getString(String s)

  {

      return JOptionPane.showInputDialog(s);

  }

}

// Address.java

public class Address

{

  private String street, city, state, zip;

  public Address(String str, String city, String st, String zip)

  {

      street = str;

      this.city = city;

      state = st;

      this.zip = zip;

  }

  public String getStreet()

  {

      return street;

  }

 

  public String getCity()

  {

      return city;

  }

  public String getState()

  {

      return state;

  }

  public String getZip()

  {

      return zip;

  }

}

// Manufacturer.java

public class Manufacturer

{

  private String companyName;

  private Address companyAddress;

 

  public Manufacturer()

  {

      this.companyName = "";

      this.companyAddress = null;

  }

 

  public Manufacturer(String compName, Address address)

  {

      this.companyName = compName;

      this.companyAddress = address;

  }

 

  public String getCompanyName()

  {

      return companyName;

  }

 

  public void setCompanyName(String companyName)

  {

      this.companyName = companyName;

  }

 

  public Address getCompanyAddress()

  {

      return companyAddress;

  }

 

  public void setCompanyAddress(Address address)

  {

      this.companyAddress = address;

  }

}

// Product.java

import java.text.SimpleDateFormat;

import java.util.Date;

public class Product

{

 

  SimpleDateFormat sdf = new SimpleDateFormat("MM/dd/yyyy");

 

 

  Manufacturer manufacture;

 

 

  String productName;

 

 

  int quantity;

 

 

  double unitPrice;

 

 

  Date productCreated;

 

 

  public Product()

  {

      this.productName = "";

      this.quantity = 0;

      this.unitPrice = 0.0;

      this.productCreated = null;

      this.manufacture = null;

  }

 

  public Product(String prodName, int quantity, double unitPrice,

                        Date productCreated, Manufacturer manufact)

  {

      this.productName = prodName;

      this.quantity = quantity;

      this.unitPrice = unitPrice;

      this.productCreated = productCreated;

      this.manufacture = manufact;

  }

 

 

  public Date getProductCreated()

  {

      return productCreated;

  }

 

 

  public void setProductCreated(Date productCreated)

  {

      this.productCreated = productCreated;

  }

 

  // to get the Manufacturer object

  public Manufacturer getManufacture()

  {

      return manufacture;

  }

 

  // to set the Manufacturer object

  public void setManufacture(Manufacturer manufacture)

  {

      this.manufacture = manufacture;

  }

 

  // to get the name of the product

  public String getProductName()

  {

      return productName;

  }

 

  // to set the name of the product

  public void setProductName(String prodName)

  {

      this.productName = prodName;

  }

 

  // to get the quantity of the product

  public int getQuantity()

  {

      return quantity;

  }

 

  // to set the quantity of the product

  public void setQuantity(int quantity)

  {

      this.quantity = quantity;

  }

 

  // to get the unit price of the product

  public double getUnitPrice()

  {

      return unitPrice;

  }

 

  // to set the unit price of product

  public void setUnitPrice(double unitPrice)

  {

      this.unitPrice = unitPrice;

  }

 

  // to update the quantity of the product

  public void upDateQuantity(int quantity_upDate)

  {

      quantity += quantity_upDate;

  }

 

  // to update the price of the product

  public void upDatePrice(double price_upDate)

  {

      this.unitPrice = price_upDate;

  }

 

 

  public String getProductInfomation()

  {

      String result = "";

      result += String.format("%-30s", productName);

      String dateForm = sdf.format(productCreated);

      result += String.format("\t %s", dateForm);

      result += String.format("%10d", quantity);

      result += String.format("\t%15.2f", unitPrice);

      result += String.format("\t%15s",

                          manufacture.getCompanyName());

      result += String.format("\t%20s",

                 manufacture.getCompanyAddress().getState());

      return result;

  }  

}

Explanation:

  • Create a manufacturer class to store and get information about company name and company address.
  • Create a product class to hold the manufacturer object, product name and other relevant information.
4 0
1 year ago
Windows is displaying an error about incompatible hardware. You enter BIOS/UEFI setup to change the boot priority order so that
Irina18 [472]

Answer:

A

Explanation:

The most likely cause of the problem is that You signed in to BIOS/UEFI with the user power-on password rather than the supervisor power-on password. The User password only enables the machine to boot while the supervisor password allows entering the BIOS settings.

4 0
2 years ago
Sarah works in a coffee house where she is responsible for keying in customer orders. A customer orders snacks and coffee, but l
Maru [420]

Answer:

Stack

Explanation:

Stack is a linear data structure that follows a particular order in the way an operation is done or sequence a job is completed.

It uses either LIFO ( Last In, First Out) which is also known as first come first served sequence or FILO (First In, Last Out) sequence.

There are several real life examples of which we can use the example of replacing the snack items Sarah brought for the customer.

If Sarah used the LIFO method, it means she replaced the snack items first ontop of the already existing snack items that's why there is a mismatch.

5 0
1 year ago
Read 2 more answers
When a file is transferred between two computers, two acknowledgment strategies are possible. in the first one, the file is chop
ra1l [238]
The TCP/IP stack is responsible for the "chopping up" into packets of the data for transmission and for their acknowledgment. Depending on the transport protocol that is used (TCP or UDP) each packet will be <span>acknowledged or not, respectively.
</span><span>the strategy when the file is chopped up into packets, which are individually acknowledged by the receiver, but the file transfer as a whole is not acknowledged is OK in situations (Applications) that do not need the whole file to be sent, Web site for example: different parts of the web site can arrive in different times.

The other strategy, in which </span><span>the packets are not acknowledged individually, but the entire file is acknowledged when it arrives is suitable for FTP (mail transfer), we need whole mail, not parts of it. </span>
5 0
2 years ago
Other questions:
  • _________ is a term used to describe the process of recording movement of an object and translating it into a digital format..
    8·2 answers
  • James is an employee at the packaging unit of a chocolate factory that has come up with a new concept of packaging and marketing
    11·2 answers
  • Consider a DASH system for which there are N video versions (at N different rates and qualities) and N audio versions (at N diff
    8·1 answer
  • A queueing system has four crews with three members each. The number of "servers" is:
    5·2 answers
  • Which of the following option is correct about HCatalog?
    14·1 answer
  • In a ____________________ attack, the attacker sends a large number of connection or information requests to disrupt a target fr
    14·1 answer
  • Your company wants to conduct an exploratory study to gain new insights into some product changes you are considering. Which typ
    15·1 answer
  • 1. Assign to maxSum the max of (numA, numB) PLUS the max of (numY, numZ). Use just one statement. Hint: Call FindMax() twice in
    7·1 answer
  • The web development team is having difficulty connecting by ssh to your local web server, and you notice the proper rule is miss
    8·1 answer
  • You are a security consultant and have been hired to evaluate an organization's physical security practices. All employees must
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!