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
kobusy [5.1K]
3 years ago
10

Assume you use Bubble Sort to sort a list with 15 elements (i.e.n= 9). Exactly howmany comparisons do you use (in the worst case

)?
Computers and Technology
1 answer:
Salsk061 [2.6K]3 years ago
4 0

Answer:

Worst case is 55 but it really does depend on the numbers

Explanation:

1/2n squared -1

So that would be 7.5 squared -1

You might be interested in
The major objective of this lab is to practice class and object-oriented programming (OOP), and separate files: 1. We will reuse
vovangra [49]

Answer:

Implementation of resistor.cpp

#include "resistor.h"

Ohms::Ohm()

{

// default constructor

voltage=0;

}

Ohms::Ohm( double x) // parameterised constructor

{

voltage = x; // voltage x set to the supply voltage in the private data field called voltage

}

Ohms:: setVoltage(double a)

{

voltage = a;// to set supply voltage in private data field called voltage

}

Ohms::setOneResistance( String s, double p)

{

cin>>p; //enter the resistance value

if(p<=0) // if resistance is less than or equals to 0

return false

else // if re

cin.getline(s);

}

Ohms::getVoltage()

{

return voltage; //return voltage of ckt

}

Ohms::getCurrent()

{

return current; //return current of ckt

}

Ohms:: getNode()

{

return resistors; //return resistors of ckt

}

Ohms::sumResist()

{

double tot_resist = accumulate(resistors.begin(),resistors.end(),0); //std::accumulate function for calculating sum //of vectors and following are the starting and ending points

return tot_resist;

}

Ohms::calcCurrent()

{

if(current <=0) // if current is less than or equal to 0

return false;

else   // if current is greater than 0

return true;

}

Ohms:: calcVoltageAcross()

{

if(voltage<=0) // if voltage is less than or equal to 0

return false;

else //if voltage greater than 0

return true;

}

Explanation:

in the case of main.cpp its simple just make a class object and remember to include resistors.cpp with it for which the second last picture describes the process precisely. (Hint: Use theunit test case functions in the main.cpp).

As you can see node is a structure consisting of member variables, followed by a class Ohms representing a DC circuit.

By looking at these pictures, it is needed to implement the main.cpp and resistor.cpp files. The user defined header file resistor.h already consists of all contents of Class Ohm, struct node. You don't need to modify it in anyway in such case.

8 0
3 years ago
You are a database administrator. Chantelle comes to you asking for help on how to access all the data in one row of the databas
Novosadov [1.4K]
I believe the answers would be A and B. Because you have to fulfill  Chantelle's wishes and you have to access their data. Which I am guessing would require a database backup.  

I hope this helps. 
7 0
3 years ago
PLEASE HELP MEH IDK WHAT TO DO!!!!! PLEASE!!!!!!!!!!!!
Over [174]
I would ask myself c
3 0
3 years ago
Read 2 more answers
Assume that you have a 64-bit microprocessor, with a 48-bit external data bus, driven by a 4.0 GHz input clock. This microproces
Dvinal [7]

Answer:

The maximum Data transfer rate is 320 Mb/s

Explanation:

The minimum microprocessor bus cycle duration = 100 input clock cycles and Data bus clock = 4.0 GHz = 4 × 10⁹ Hz

The maximum bus cycle rate = Data bus clock/minimum microprocessor bus cycle duration

Therefore, The maximum bus cycle rate = 4.0 GHz/100 = 4 × 10⁹  / 100 = 4 × 10⁷ = 40 × 10⁶ = 40 M/s

8 bits is equal to 1 byte, therefore 64 bit is equal to (64/8 = 8) byte.

Data transferred per bus cycle = 64-bit = 8 bytes.

The maximum Data transfer rate per second = bus cycle rate × data transferred per bus cycle = 40 M/s × 8 bytes = 320 Mbytes/s = 320 Mb/s.

The maximum Data transfer is 320 Mb/s

6 0
3 years ago
Importance of good safe design
KengaRu [80]

Answer:

Safe design incorporates ergonomics principles as well as good work design. Good work design helps ensure workplace hazards and risks are eliminated or minimised so all workers remain healthy and safe at work.

Explanation:

Good work design, or safety in design, considers hazards and risks as early as possible in the planning and design process. It aims to eliminate or minimise the possibility of workplace injury or illness throughout the life of the product or process. ... products. layout and configuration

3 0
3 years ago
Read 2 more answers
Other questions:
  • If you receive an increase in pay, how will that affect your payroll deductions?
    8·1 answer
  • Why is it useful to have host-based firewalls?
    5·1 answer
  • WordArt styles allow you to add ____.
    9·1 answer
  • Which of the following types of copyright license is most appropriate if you write a novel and would like to post it online for
    11·1 answer
  • An example of cooler red is
    8·1 answer
  • A technician has been asked to troubleshoot a simple network problem that seems to be caused by software. Which troubleshooting
    7·1 answer
  • When a person devises the idea for the venture, develops a business plan, uses savings or loans to acquire other resources and a
    9·1 answer
  • Imagine that you have access to a class named MyCircle that has void setRadius(double r) and double getRadius() methods. Write a
    14·1 answer
  • Which is an appropriate strategy for using a workplace blog?
    9·1 answer
  • What command issued from the command prompt will show the route that a packet travels from the issuing computer to another compu
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!