Explain the role that the number of data exchanges plays in the analysis of selection sort and bubble sort. What role, if any, does the size of the data objects play

Answers

Answer 1

Answer:

The greater the number of exchanges are there greater is the complexity of the algorithm. Thus it is a measure to check for the complexity of the program.


Related Questions

Write the function void sort2(double* p, double* p) that receives two pointers and sorts the values to which they point. To test the function, write the main function that prompts the user to enter two values and then print out the sorted values. If you call sort2(&x, &y) then x <= y after the call.

Answers

The function illustrates the use of pointers.

Pointers are used to store address in programming languages such as C and C++.

The program in C language where comments are used to explain each line is as follows:

#include <stdio.h>

//This defines the function

void sort2(double* p1, double* p2){

   //This declares a temporary variable t

double t;

//If p2 is less than p1,

if (*p2 < *p1) {

    //The next 3 lines swap their values

    t = *p2;

    *p2 = *p1;

    *p1 = t;

}

//This prints p1

printf("%f ", *(p1));

//This prints p2

printf("%f ", *(p2));

}

//The main method to test the function begins here

int main(){

double x = 23.0;

double y = 14.1;

sort2(&x, &y);

return 0;

}

//The program ends here

Read more about similar programs at:

https://brainly.com/question/15683939

The ______ Works on a single variable or constant. *​

Answers

Answer:

man

Explanation:

We can find out how robots work by looking in detail at the smaller parts. What do we call this?

Answers

Answer: This can be called the engineering.

Explanation:

Because the small parts is the bearings inside the robot

Assume that the speed of new computers costing a certain amount of money grows exponentially over time, with the speed doubling every 18 months. Suppose you need to run a very time consuming program and are allowed to buy a new computer costing a fixed amount on which to run the program. If you start now, the program will take 7 years to finish. How long should you delay buying the computer and starting the program so that it will finish in the shortest amount of time from now

Answers

Therefore, in order to run the program in the shortest time, you should delay for 3 years

Given that the speed of new computers costing a certain amount of money grows exponentially over time, with the speed doubling every 18 months.

Exponential equation as a function of time can be expressed as

P(t) = [tex]P_{0}[/tex][tex]R^{t/T}[/tex]

Quantity P will be increasing exponentially when R > 1. And it will decrease exponentially when R < 1.

Suppose you need to run a very time consuming program and are allowed to buy a new computer costing a fixed amount on which to run the program. If you start now, the program will take 7 years to finish.

Let the time required to run and complete a program for time t years be P(t).

If the speed doubling every 18 months, which is 3/2 years. This will eventually cause the running time to decrease by half (0.5)

P(t) = 7[tex](1/2)^{3t/2}[/tex] = 7[tex](2)^{-3t/2}[/tex]

The total time T will be sum of the delay time t and the time of running the program. That is

T(t) = t + P(t)

T(t) = t + 7[tex](2)^{-3t/2}[/tex]   .......... (2)

We can calculate the minimum time t by differentiating the above equation and make it equal to zero.

dT/dt = 1 + 14/3[tex](2)^{-3t/2}[/tex](ln0.5) = 0

14/3[tex](2)^{-3t/2}[/tex](ln0.5) = -1

[tex](2)^{-3t/2}[/tex](ln0.5) = -3/14

[tex](2)^{-3t/2}[/tex] = -3/14ln0.5

Log (natural logarithm) both sides

-3t/2ln2 = ln(3/14ln2)

make t the subject of formula

t = - 3ln(3/14ln2) ÷ 2ln2

t = 2.5 approximately

To know how long you should delay buying the computer and starting the program so that it will finish in the shortest amount of time from now, substitute t into equation 2

T(2.5) = 2.5 + (7)[tex]2^{-3(2.5)/2}[/tex]

T(2.5) = 2.5 + 0.5202

T(2.5) = 3.02 years

T (2.5) = 3 years approximately

Therefore, in order to run the program in the shortest time, you should delay for 3 years

Learn more here: https://brainly.com/question/6497099

Imagine that you have an image that is too dark or too bright. Describe how you would alter the RGB settings to brighten or darken it. Give an example.

Answers

turn the brightness up

Partially-filled Arrays
Write the function rindby() which stands for remove mark>if not divisiby by. The function removes all elements from the array that are not evenly divisible by the argument n. You can find out if a number is evenly divisible by n using the remainder operator: % (there will be nothing left over).
The function returns the number of items removed or -1 if the array was originally empty.
The function takes 3 arguments:
the array of int that may be modified.
the size of the array (use size_t as the type)
the int n used to check for divisibility
Here are two short examples:
int a[] = {2, 3, 4, 5, 6};
size_t size = 5;
int removed = rindby(a, size, 2);
// removed->2, a = [2, 4, 6], size = 3
size = 0;
removed = rindby(a, size, 3);
// removed-> -1, no change otherwise
In the first case, the numbers 3 and 5 are removed because they are not divisible by 2. Only the numbers that are divisible by 2 are left in the array.
In the second, size has been set to , so the input array is empty and the function returns - 1.
Exam C++ Quick Reference
p1.cpp
1 #include // size_t for sizes and indexes
2 using namespace std;
3
4 ////////////////WRITE YOUR FUNCTION BELOW THIS LINE ///////////////
5 int rindby(int all, size_t& size, int number)
6 {
7 int result;
8 // Add your code here
9 return result;
10 }
11

Answers

Answer:

um

Explanation:

Write an inheritance hierarchy for classes Quadrilateral, Trapezoid, Parallelogram, Rectangle and Square. Use Quadrilateral as the superclass of the hierarchy. Create and use a Point class to represent the points in each shape. Make the hierarchy as deep (i.e., as many levels) as possible. Specify the instance variables and methods for each class. The private instance variables of Quadrilateral should be the x-y coordinate pairs for the four endpoints of the Quadrilateral. Write a program that instantiates objects of your classes and outputs each object‟s area (except Quadrilateral​

Answers

Answer:

CODE:

public class QuadrilateralTest {

public static void main(String[] args) {

// NOTE: All coordinates are assumed to form the proper shapes

// A quadrilateral is a four-sided polygon

Quadrilateral quadrilateral =

new Quadrilateral(1.1, 1.2, 6.6, 2.8, 6.2, 9.9, 2.2, 7.4);

// A parallelogram is a quadrilateral with opposite sides parallel

Parallelogram parallelogram =

new Parallelogram(5.0, 5.0, 11.0, 5.0, 12.0, 20.0, 6.0, 20.0);

// A rectangle is an equiangular parallelogram

Rectangle rectangle =

new Rectangle(17.0, 14.0, 30.0, 14.0, 30.0, 28.0, 17.0, 28.0);

// A square is an equiangular and equilateral parallelogram

Square square =

new Square(4.0, 0.0, 8.0, 0.0, 8.0, 4.0, 4.0, 4.0);

System.out.printf(

"%s %s %s %s\n", quadrilateral, parallelogram,

rectangle, square);

}

}

RESULT:

Coordinates of Quadrilateral are:

2 (1.1, 1.2), (6.6, 2.8), (6.2, 9.9), (2.2, 7.4)

3  

4 Coordinates of Parallelogram are:

5 (5.0, 5.0), (11.0, 5.0), (12.0, 20.0), (6.0, 20.0)

6 Width is: 6.0

7 Height is: 15.0

8 Area is: 90.0

9  

10 Coordinates of Rectangle are:

11 (17.0, 14.0), (30.0, 14.0), (30.0, 28.0), (17.0, 28.0)

12 Width is: 13.0

13 Height is: 14.0

14 Area is: 182.0

15  

16 Coordinates of Square are:

17 (4.0, 0.0), (8.0, 0.0), (8.0, 4.0), (4.0, 4.0)

18 Side is: 4.0

19 Area is: 16.0

Explanation:

In this exercise we have to use the knowledge of computational language in JAVA, so we have that code is:

It can be found in the attached image.

So, to make it easier, the code in JAVA can be found below:

public class QuadrilateralTest {

public static void main(String[] args) {

new Quadrilateral(1.1, 1.2, 6.6, 2.8, 6.2, 9.9, 2.2, 7.4);

new Parallelogram(5.0, 5.0, 11.0, 5.0, 12.0, 20.0, 6.0, 20.0);

new Rectangle(17.0, 14.0, 30.0, 14.0, 30.0, 28.0, 17.0, 28.0);

new Square(4.0, 0.0, 8.0, 0.0, 8.0, 4.0, 4.0, 4.0);

System.out.printf(

"%s %s %s %s\n", quadrilateral, parallelogram,rectangle, square);

}

}

See more about JAVA at brainly.com/question/2266606

Tamanika got a raise in her hourly pay, from $15.90 to $17.65. Find the percent increase

Answers

15.90/17.65 = x/100
1590 = 17.65x
x = 90.08%
So this means the increase would be 9.92%

F= A· (B+C). draw the symbol for the logic gate​

Answers

Answer:

You need an AND gate and an OR gate.

Explanation:

see picture below

list ten beeping sounds in a computer system according to the hard ware​

Answers

Answer:

CMOS Shutdown Register Failure

Explanation:

When you create a _____ query, the value the user enters in the dialog box determines which records the query displays in the results. a. parameter

Answers

When a parameter query is created, the value entered in a dialog box by an end user determines the record that would be displayed in the results.

A query refers to a computational request for data (information) that are saved either in a database table, from existing queries, or from a combination of both a database table and existing queries.

Basically, there are four (4) main types of query and these include:

Select query.Action query.Aggregate query.Parameter query.

A parameter query is designed and developed to display a dialog box that prompts an end user for data or field criteria, which determines the record that would be displayed in the results.

Read more: https://brainly.com/question/23388493

The capability of moving a completed programming solution easily from one type of computer to another is known as ________. Group of answer choices

Answers

Answer: Portability

Explanation: I hope it helps you!

LIst types of computer process ?

Answers

Answer:

Transaction Processing.

Distributed Processing.

Real-time Processing.

Batch Processing.

Multiprocessing.

Write a program that reads a list of integers, and outputs whether the list contains all even numbers, odd numbers, or neither. The input begins with an integer indicating the number of integers that follow.If the input is:5246810Then the output is:all evenIf the input is:513579

Answers

Answer:

uuuuu

Explanation:

Answer:

57677748957394209690369-34064666

Explanation:

In a _____, there is no skipping or repeating instructions. A. iteration B. sequence C. selection D. conditional

Answers

Answer:

B: Sequence.

Explanation:

A good algorithm should have which three components?
O A. Commands, inputs, and outputs
B. Clarity, readability, and sequencing
C. Steps, order, and outcomes
O D. Clarity, simplicity, and brevity

Answers

Answer:

a good algorithm must be able to accept a set of defined input. Output: a good algorithm should be able to produce results as output, preferably solutions. Finiteness: the algorithm should have a stop after a certain number of instructions. Generality: the algorithm must apply to a set of defined inputs.Explanation:

A good algorithm should have Steps, order, and outcomes. The correct option is C.

What is algorithm?

An algorithm is a set of instructions that solves a particular problem or performs a specific task.

An algorithm must be well-defined and organised in order to be effective, with clear steps or procedures, a logical order of operations, and a clear understanding of the expected outcomes or results.

As a result, the steps, the order in which those steps are executed, and the expected outcomes or results of following those steps are three essential components of a good algorithm.

Option A describes the fundamental components of a programme, but it is not always a good algorithm.

Option B emphasises some important characteristics of good code, but not specifically related to algorithm design.

Option D addresses important aspects of any type of technical writing, but is not specifically related to algorithm design.

Thus, the correct option is C.

For more details regarding algorithm, visit:

https://brainly.com/question/22984934

#SPJ7

Develop an algorithm and draw a flowchart to determine and input number is palindrome or not.​

Answers


function checkPalindrome(str){
let reversed = str.split("").reverse().join("")
return str === reversed
}
let str1 = "anna"
let str2 = "banana"
let str3 = "kayak"
checkPalindrome(str1)
// -> true
checkPalindrome(str2)
// -> false
checkPalindrome(str3)
// -> true

Ruzwana is a system administrator at an organization that has over 1000 employees. Each of the employees brings their own devices to work. She wants to find an efficient method that will allow her to make the various devices meet organizational standards. In addition, she would like to deploy various universal applications such as the VPN client, meeting software, and productivity software to these systems. Which of the following options should Ruzwana use to achieve the desired outcome in this scenario?
a. A provisioning package.
b. A catalog file.
c. A configuration set.
d. An answer filE.

Answers

In this scenario, the option which Ruzwana should use to ensure that the various devices meet organizational standards and for the deployment of various universal applications is: d. An answer file

An answer file can be defined as an XML-based file which contains the configuration settings and values that should be used during the installation of a software program on one or more devices in accordance with specific standards. Thus, each and every device using the same answer file would have the same configuration setting.

Additionally, an answer file allows a system administrator to automatically deploy various software programs such as meeting software and productivity software to a particular system or network.

In this context, the most appropriate option which Ruzwana should use to ensure that the various devices meet organizational standards and for the deployment of various universal applications is an answer file.

Read more on software here: https://brainly.com/question/25703767

The web design teams of a company are working on designing websites for various companies, Pick the ideas that employ proper use of
metaphor.
Danny is creating a website for senior citizens that uses large fonts to improve accessibility. Keenan is working on a website for school children
learning chemistry that is designed to look like a chemistry lab. Justin has created a website for a flower bouquet manufacturer that shows all
the available types of bouquets. Adam has designed a website for viewing movie trailers for the local cinema that display the video on a screen
made to look like a drive-in theater. Paul has created a website for pre-school children to learn English using very simple language and small
words.

Answers

Answer:

C

Explanation:

I KNOW ITS RIHGHT

Answer:

1. Keenan is working on a website for school children learning chemistry that is designed to look like a chemistry lab. 2. Adam has designed a website for viewing movie trailers for the local cinema that display the video on a screen made to look like a drive-in theater

Explanation: 5/5 on the test

What type of database replication relies on centralized control that determines when replicas may be created and how they are synchronized with the master copy

Answers

Database replication is very common in this Era. Traditional database replication is relies on centralized control that determines when replicas may be created and how they are synchronized with the master copy.

Database replication  is known to be the constant electronic copying of data from a database using one computer or server that is connected also to a database in another . this ensure that all users do share the same level of information.

Replication is often done to technologies which are used for copying and distributing data and database objects from one database to another and thereafter use in synchronizing between databases.

Conclusively, Replicas can only be made in the Traditional database replication through the power of centralized control.

See full question below

What type of database replication relies on centralized control that determines when replicas may be created and how they are synchronized with the master copy?

a distributed database model

b. traditional database replication

c. enterprise replication

d. local database model

Learn more about database replication from

https://brainly.com/question/6447559

What is the full form of MPEG? The full form of MPEG is blank.

Answers

Answer:

Moving Picture Experts Group

Explanation:

Answer:

The full form of MPEG is Moving Picture Experts Group.

Explanation:

MPEG is a group of working experts to determine video or audio encoding and transmitting specifications/standards.

ARAT ML MGA LODS
ID:426667817 ​

Answers

What? If this is an online video ch at thing, then count me out lol sorry I just think that this is dangerous I dk
Nooo stop posting these they aren’t safe

1. Where did the Industrial Revolution start and why did it begin there?​

Answers

Answer:

The first Industrial Revolution began in Great Britain in the mid-to-late 1700s, when innovation led to goods being produced in large quantities due to machine manufacturing.

This process began in Britain in the 18th century and from there spread to other parts of the world. Although used earlier by French writers, the term Industrial Revolution was first popularized by the English economic historian Arnold Toynbee (1852–83) to describe Britain's economic development from 1760 to 1840.

Answer:

This process began in Britain in the 18th century and from there spread to other parts of the world. Although used earlier by French writers, the term Industrial Revolution was first popularized by the English economic historian Arnold Toynbee (1852–83) to describe Britain’s economic development from 1760 to 1840  

Historians have identified several reasons for why the Industrial Revolution began first in Britain, including: the effects of the Agricultural Revolution, large supplies of coal, geography of the country, a positive political climate, and a vast colonial empire.

Explanation:

How has technology has impacted Ghana​

Answers

Answer:

there are many ways that technology has impacted Ghana.

1. The republic of Ghana have been making some plans that can help with economic growth in the last decade.

2. Ghana has a higher productivity rate than the neighboring nations.

3. The republic of Ghana made a shift onto incentive-driven economic policies, so that way it could help improve leadership.

In the EXPLORE online library, the ratio of the number of novels to that of dictionaries is 2:3 and the total number of novels is 624. If Joe buys more novels and the ratio becomes 7:3, then how many novels have been bought in total?

Answers

Answer:

Answer is 2184

Explanation:

1st of all we need to know the total number of novels in the library if I have it with a ratio of one meaning:

2---------624

1----------???

(1×624)÷2 =312

Meaning with a ratio of 1 I'll have 312

Take the 312 and multiply with 7

It will give you 2184

That's the number of Novels which were bought by joe

Each road is associated with a value indicating the level of danger in maintaining that road during winter months. There are many subsets of roads such that the roads in such subsets keep the towns connected directly or indirectly. Each subset is assigned a cost of maintenance, which is directly proportional to the highest danger level of the road present in that subset. The engineer wants to select the smallest subset that keeps the towns connected directly or indirectly and that also has the lowest cost of maintenance. Develop an algorithm to find such a subset. Justify the correctness of your algorithm and derive its runtime.

Answers

Answer:

Each road is associated with a value indicating the level of danger in maintaining that road during winter months. There are many subsets of roads such that the roads in such subsets keep the towns connected directly or indirectly.

True or False? Voice recognition is the process of determining the meaning of the words spoken by a human.

Answers

Answer:

The answer is False.


An engine that creates ignites fuel with highly compressed air.

Answers

Explanation:

An engine that creates ignites fuel with highly compressed air. air engine

In your own words, explain the process undertaken while testing the significance of a multiple linear regression model parameter Indicating clearly the hypothesis considered, test statistics used rejection criteria and conclusion.​

Answers

Multiple Linear Regression Analysis consists of more than just fitting a linear line through a cloud of data points. It consists of three stages: 1) analyzing the correlation and directionality of the data, 2) estimating the model, i.e., fitting the line, and 3) evaluating the validity and usefulness of the model.

Edhesive 4.3 code practice question 2

Answers

Sos shacahacwhaveusbsusvs js
Other Questions
Read carefully and choose the option with the correct series of words that corresponds to the text. Read carefully and choose the option with the correct list of words based on the text.Hello! My name is Juan and I'm from Alaska. On the weekend I will visit my friend Jorge and meet his family in Spain. I'm going to be in Jorge's country for a month. In my suitcase I want to wear summer clothes because it is July and it is very hot in Spain. I also > I'm going to put in my suitcase a suit to go to Jorge's sister's wedding in Cordoba. Jorge wants to go with me to the Mosque of Cordoba and buy at the Victoria market.On the weekend we go to the stadium to see our favorite footballteam.In the evening I will read about Spain on theinternet. I am very happy and my parents are proud because I am going to travel and learn. (1 point)Question 26 options: 1) Protagonist or protagonists: Juan and Jorge;scenario: Alaska; theme: The clothes needed.2)Protagonist or protagonists:Jorge; scenario: Spain; theme: the importance of friendship.3)Protagonist or protagonists:Juan; scenario: his house or State; theme: preparation for a trip.4)Protagonist or protagonists: Juanand Jorge; scenario: Crdoba; theme: The parents' feelings. (05.05)Select the inequality that corresponds to the given graph. (5 points) Please help asap.. I will give Brainliest!As you put these events in chronological order, did you notice any themes or trends? Chronological thinking, specifically the act of putting past events in order, helps historians make sense of the past and create historical narratives. Simply put, historical narratives are stories of the past. With this in mind, write a brief historical narrative of early American history using these events and your general knowledge of the past. Your narrative should be one or two paragraphs long and include at least 6 of the events listed above. Demandez si votre partenaire a les parents ouprofs suivants. Ensuite, changez de rles.MODELENon, je n'ai pasun prof tahitienEst-ce que tude soeurA: Est-ce que tu as un prof tahitien?as une soeur?B: Non, je n'ai pas de prof tahitien.Et toi, est-ce que tu as un prof tahitien?A: Oui, j'ai une prof tahitienne, Mile Mataoa.1. une prof franaise2. un prof algrien3. un frre4. une soeur5. des cousins6. des tantes7. un oncle Marcela heard her manager loud and clear: Marcela needed to be more careful in her work or she wouldnt have a job. Marcela ______________ to her manager, saying, "I will definitely make fewer errors from now on."a. selected a channelb. decoded a messagec. gave feedback ModaO cabelo da moda,A roupa, a dana,A gria da moda.A moda passa,Eu fico.(Ulisses Tavares)Os verbos existentes no poema Moda so transitivos ou intransitivos? Justifique. How far from the center of the earth is the center of mass of the earth moon system?. c im c bn no phn bit vt th t nhin v vt th nhn to What was found at Pueblo Bonito in Chaco Canyon, New Mexico? Gorillas may look threatening, but they are peaceful and family-oriented animals. They are the largest of all primates, but as plant-eating animals, do not bother other creatures. Which choice best paraphrases the information? 50 points. Describe this imagedescribe this image to the best of your ability in a couple of sentences summarizing the following; how does it make you feel? what does the image contain? what is happening in the image?full answers only! incorrect answers will lead to you being flagged! Given: p-q= pq/2.Express p in terms of q. What access-point feature allows a network administrator to define what type of data can enter the wireless network? a ladder 7.5m long rests against a wall . the botton of ladder is 2.1m from the wall . calculate how far the ladder reaches up the wall.PLEASE SOLVE THIS QUESTION!! Simplify as far as possible without using a calculator. Identify the correct way to cite the BLS Highest-Paying Occupations web page.O Occupational Outlook Handbook. "Highest-Paying Occupations." Bureau of Labor Statistics and US Departmentof Labor, 2015.O "Occupational Outlook Handbook." Highest-Paying Occupations. Bureau of Labor Statistics and US Departmentof Labor, 29 March 2015. Web. 1 May 2015.O "Highest-Paying Occupations." Occupational Outlook Handbook. Bureau of Labor Statistics and US Departmentof Labor, 29 March 2015. Web. 1 May 2015.O Highest-Paying Occupations, Occupational Outlook Handbook. Bureau of Labor Statistics and US Department ofLabor, 2015. Web. 1 May 2015. Compare the religious experience in the Massachusetts Bay colony and that on the frontier during the second great awakening. - answer must be 300 to 500 words on the answer Find the slope of the line that contains the following pair of points:(4,-5) and (-1, -3). where can i find premium air A nurse is describing the advantages and disadvantages of circumcision to a group of expectant parents. Which statement by the parents indicates effective teaching