write a method that finds the maximum element in an array of double val-ues using the following header: public static double max(double[] array) write a test program that prompts the user to enter ten numbers, invokes this method to return the maximum value, and displays the maximum value. the program must then ask if the user wants to continue with another array of numbers. if the user enters "y", the program will start a new conversion. other-wise, it’ll stop.

Answers

Answer 1

Arranging the array's elements in ascending order makes it easy to identify the element with the largest value. Following sorting, the first element will represent the array's smallest element, followed by the second-smallest element, the largest element, and so on.

Find the maximum by iterating through the array first. Together with its index, save this as the first maximum. Now search through the entire array for the second maximum, leaving off the largest element. Find the third largest element by iterating through the array three times and omitting the maximum and second maximum. The goal of the method getresult(int arr[],int n) is to identify the array's maximum and minimum elements with the fewest possible comparisons.

Learn more about Array here-

https://brainly.com/question/13107940

#SPJ4


Related Questions

timmy is a new employee at an organization and was given a laptop. upon connecting the laptop to the local wi-fi network, he receives an ip address of 192.168.58.127 but is not able to connect to the internet. what could be the problem? quizlet

Answers

Since Timmy upon connecting the laptop to the local wi-fi network, he receives an ip address of 192.168.58.127 but is not able to connect to the internet the problem could be It could be service provider or the wifi as well as the router itself. It can also be the fact that access has been restricted or passworded.

What is local network on Wi-Fi?

A local area network (LAN) is a network that is said to bve made up of a number of computers that are connected in a certain area. TCP/IP ethernet or Wi-Fi is used in a LAN to link the computers to one another.

For two or a lot of devices, a wireless local area network (WLAN) is seen as a form of  wireless distribution technique. WLANs employ high-frequency radio waves and frequently have an Internet access point built in. Users of a WLAN can move across the coverage area, which is frequently a house or small business, while still remaining connected to the network.

Therefore, Wi-Fi enables devices to connect to one another similarly to how network cables function, only without the need for physical cords. In essence, a Wi-Fi network is a wireless local network.

Learn more about wi-fi network from

https://brainly.com/question/8985345
#SPJ1

uses URLs and the hypertext protocol to make online files easily accessible to users
A. browser
B. packets
C. IP addresses
D. internet
E. World Wide Web

Answers

Answer:

browser

browser is a computer program that enables you to use hypertext links, motion, and other features.

All IT systems enable a network administrator to set access levels, or permissions, for
just one user. true or false? question

Answers

Answer:

Explanation:

Comment

That shouldn't be true at all.

Let us suppose that the network contains something like a Microsoft program and different people on the network are working on different things.

The administrator as in a school situation might not students to be looking at an answer that was derived a different way. The administrator would want to block that possibility.

three advantages associated with a software-defined network include . a. the risk of human error is reduced, overall network support and operations costs are reduced, and new applications can be made available sooner b. the ability to support more concurrent devices, minimal infrastructure changes, and lower latency c. the ability to support exciting new applications, greater bandwidth, and improved security d. lower latency, greater bandwidth, and the ability to support more devices

Answers

The three advantages associated with a software-defined network include the following: A. the risk of human error is reduced, overall network support and operations costs are reduced, and new applications can be made available sooner.

What is a software?

A software can be defined as a set of executable instructions that is typically designed and developed to instruct a computer system on how to perform a specific task and function, as well as proffering solutions to a network problem and other types of problem.

Generally speaking, there are three (3) main types of software and these include the following:

Application softwareUtility softwareSystem software

The advantages of a software-defined network.

In Computer technology, the advantages of a software-defined network include the following:

The risk of human error is mitigated or reduced.Overall network operations costs are lesser.Overall network support costs are lower.New software applications are developed and made available sooner.

Read more on network here: https://brainly.com/question/28342757

#SPJ1

a global communications system created by connecting many different computer networks
A. browser
B. packets
C. IP addresses
D. internet
E. World Wide Web

Answers

Answer:

internet

The Internet is a large IP network of networks.

Answer:

c

Explanation:

, modify that script so that if alice (or harry) run the script, it will make a copy of the accounting.txt file in a manner that allows bob to see the content.

Answers

Using the knowledge in computational language in JAVA it is possible to write a code that  enters the entire path to a test file e.g. /home/$USER/test when prompted, the script executes as expected and makes a copy of "test" in the /tmp directory.

Writting the code:

xieerqi:

$ ./copyScript.sh                                            

Enter path to file: ~/testFile.txt

File entered is  /home/xieerqi/testFile.txt

xieerqi:

$ ./copyScript.sh                                            

Enter path to file: ~/sumFile.txt

File entered is  /home/xieerqi/sumFile.txt

ERROR, file doesn't exist

xieerqi:

$ cat copyScript.sh                                          

#!/bin/bash

read -p "Enter path to file: " FILEPATH

DIRPATH="$(dirname "$FILEPATH")"

FILENAME="$(basename "$FILEPATH" )"

if [ "$DIRPATH" == "~"   ];then

 DIRPATH="$HOME"

fi

FILEPATH="$DIRPATH"/"$FILENAME"

echo "File entered is " "$FILEPATH"

[ -e "$FILEPATH"  ] || { echo "ERROR, file doesn't exist"; exit 1;}

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

#SPJ1

What is the favorite Food?
(15 points)

Answers

my favorite food is soup because i like the flavors and its very soothing

Answer:French fries

Explanation:bc they are awesome

the internet is a network of interconnected computers. each computer interface on the internet is identified by an internet address. in ipv4 (internet protocol, version 4), the addresses are divided into five classes -- classes a through classes e. only classes a, b, and c are used to identify computers on the internet. a class a address is a bit string of length 32. a bit string consists of $0$'s and $1$'s. the first bit is 0 (to identify it as a class a address). the next 7 bits, called the \textit{netid}, identify the network. the remaining 24 bits, called the \textit{hostid}, identify the computer interface. the netid must not consist of all 1's. the hostid must not consist of all 0's or all 1's. how many class a internet addresses are there?

Answers

An IP address (internet protocol address) is a numerical identifier used to specifically identify a particular network interface.

In IPv4, addresses are 32 bits long. This permits up to 4,294,967,296 (232) different addresses. Since IPv6 addresses are 128 bits long, there can be 3.4 x 1038 (2128) different addresses. Both versions' entire pool of available addresses is decreased due to a number of reserved addresses as well as other factors. Although IP addresses are binary numbers, they are frequently written in decimal (IPv4) or hexadecimal (IPv6) form to make them easier for humans to understand and use. At the internet layer of the Internet Protocol Suite, the Internet Protocol is the protocol that specifies and permits internetworking. It essentially creates the Internet.

Learn more about Address here-

https://brainly.com/question/20012945

#SPJ4

for this assignment, we'll be using this data to study bike usage in washington d.c. based on the granularity and the variables present in the data, what might some limitations of using this data be? what are two additional data categories/variables that you can collect to address some of these limitations?

Answers

For managing transportation infrastructure, particularly during disruptions or around new developments, short-term demand forecasting is crucial.

Due to "tidal flows" of travel and use, many bike-sharing programs struggle to manage service provision and bike fleet rebalancing. Although short-term traffic demand estimates and machine learning techniques like deep neural networks have recently advanced, relatively few studies have looked into this issue utilizing a feature engineering approach to guide model selection. From real-world bike usage records, this study extracts unique time-lagged variables, such as network node Out-strength, In-strength, Out-degree, In-degree, and PageRank, that describe graph topologies and flow interactions. According to the experiment's findings, graph-based features are more crucial for demand forecasting than more widely used meteorological data.

Learn more about demand here-

https://brainly.com/question/14456267

#SPJ4

joanne is responsible for security at a power plant. the faculty is very sensitive and security is extremely important. she wants to incorporate two-factor authentication with physical security. what would be the best way to accomplish this?

Answers

The best way Joanne can accomplish a two factor authentication is to use a mantrap with a smart card at one door and a pin keypad at the other door

What is two-factor authentication?

Two-factor authentication is  a form of MFA, an electronic authentication method in which a user is granted access to a website or application only after successfully presenting two or more pieces of evidence to an authentication mechanism

Learn more on two-factor authentication from:

https://brainly.com/question/15054309?referrer=searchResults

#SPJ4

Which of the following is an example of machine learning?

a
Encrypting

b
Block-based code

c
Autocorrect

d
Programming

Answers

The option that is an example of machine learning is option A: Encrypting.

What is encryption in machine learning?

This is seen as a class of techniques known as privacy-preserving machine learning (PPML) enables machine learning models to compute directly on encrypted input and as well as provide conclusions that are also known to be encrypted. The result is one that can only be decrypted by the person who encrypted the input data.

Note that in data encryption, Sensitive information should always be encrypted to prevent hackers from been able to access it.

Learn more about machine learning from

https://brainly.com/question/25523571
#SPJ1

Answer:  programming

Explanation:

What is a piracy????????????????????????????????

Answers

Answer:

down below

Explanation:

Piracy is when you use or reproduce someone's work without their consent. Ex: downloading a movie without paying for it.

It can also refer to attacking and robbing ships at sea.

Hope this helps! :)

3. in a class, a. in a class, why do you include the function that overloads the stream insertion operator, <<, as a friend function? b. in a class, why do you include the function that overloads the stream extraction operator, >>, as a friend function?

Answers

I neeed point 10 thanks

81.4% complete question an intruder monitors an admin's unsecure connection to a server and finds some required data, like a cookie file, that legitimately establishes a session with a web server. what type of attack can the intruder perform with the cookie file?

Answers

A type of computer attack known as a "header-based attack" makes use of the attacker's capacity to tamper with arbitrary header data to take advantage of a weakness in the program that processes the target's header.

Using a fake card reader to record card information, which the attacker then programs into a copy. an online horizontal brute-force attack. Software may cause system instability by failing to release allocated memory after it has finished utilizing it. Techniques used by adversaries to passively or actively gather data that can be utilized to help targeting are referred to as reconnaissance. In IP spoofing, a hacker manipulates the source address in the packet header using tools to trick the receiving computer system into accepting the packet by making it appear as though it came from a reliable source, such as another computer on a legitimate network.

Learn more about Header here-

https://brainly.com/question/15163026

#SPJ4

What is the function of WebGL

Answers

Answer:

WebGL enables web content to use an API based on OpenGL ES 2.0 to perform 2D and 3D rendering in an HTML canvas in browsers that support it without the use of plug-ins. 

___________________________

given the schema item(itemid, name, category, price) itemsale(transid, itemid, qty) transaction(transid, custid, date) customer(custid, name, street-addr, city) where primary keys are underlined, write the following queries in sql: a. find the name and price of the most expensive item (if more than one item is the most expensive, print them all).

Answers

Given the schema item(itemid, name, category, price) itemsale(transid, itemid, qty) transaction(tran_sid, custid, date) customer(custid, name, street-addr, city), to find the name and price of the most expensive item (if more than one item is the most expensive, print them all) is given below:

The SQL Code

SET  p 1 : = ( SELECT MAX ( price ) FROM items);

SELECT * FROM items WHERE price =  p 1 ;

Using variables, p1 stores the maximum price from the table items and then uses the variable p1 in the following query to return all records which have that maximum price without limiting the number of records as you desired.

Other ways of getting the same result are given below:

2. SELECT * FROM items

WHERE itemID IN (

  SELECT itemID FROM items

  WHERE price IN (

     SELECT MAX(price) FROM  items

  )

);  

3. SELECT * FROM items

WHERE price IN (

  SELECT MAX ( price ) FROM items

) ;

Read more about SQL here:

https://brainly.com/question/27851066

#SPJ1

what security does a user id provide? a. none b. it determines the privileges accorded to the user. c. it authenticates the user in case the user forgets her password. d. it prevents an attacker from finding a user’s password entry by her name.

Answers

The security a user id provides is that it determine the privileges accorded to the user.

What are user privileges?

The set of actions a user can perform in a given system is known as user privileges. it determines the level of access they have to their own submission.

A user id which is a unique identity given to a user or a username by which a person can be identified on a system or network is used to assign privileges to a user. There are two common level of user namely:

AdminBasic user

Learn more on user privileges from:

https://brainly.com/question/7496800?referrer=searchResults

#SPJ4

you are creating a new vm in hyper-v and you want the vm to be able to perform a secure boot. what option do you need to choose when configuring the vm?

Answers

The guest can use BitLocker to encrypt the virtual machine disk by configuring the encryption support settings in Hyper-V Manager. By accessing the VM settings, we may enable this.

We can use the capability known as nested virtualization to run Hyper-V inside of a Hyper-V virtual machine (VM). This is useful for testing configurations that typically call for several hosts or running a Visual Studio phone emulator in a virtual machine. The use of nested virtualization is supported both on-premises and on Azure. Virtual switches in Hyper-V can be external, internal, or private. To share our computer's network with the virtual machines that are operating on it, create an external switch.

Learn more about Hyper V here-

https://brainly.com/question/14466010

#SPJ4

Internet banking allows you to still go to a physical bank location to do transactions. true or false

Answers

Internet banking allows you to still go to a physical bank location to do transactions: False.

What is Internet banking?

Internet banking is also referred to as online banking and it can be defined as a type of technology that is used by financial institutions (banks) to offer their customers an opportunity to receive and send money through the Internet.

This ultimately implies that, Internet banking helps to prevent the need of a customer to physically go to bank location in order to perform various financial transactions.

Additionally, some examples of Internet banking (online banking) institutions include the following:

Western UnionPay-PalMoneygramPayment processor

Read more on online banking here: https://brainly.com/question/2772610

#SPJ1

e. the program should then output the list of characters, including white spaces and punctuation marks, and the number of times each character appears in the input.

Answers

This program requires to count each character appear in the input including punctuation marks, and white spaces.

The program is written in Python as required given below:

your_input_string = input("Enter String: ") # take input from user

print("The input string is:", your_input_string) # print the input taken from user

my_string_set = set(your_input_string) # created a set of a input string

for string_element in my_string_set: # for loop to count character of string in the Set

   countOfChar = 0 # variable countOfChar declaration

   for character in your_input_string: # for loop

       if character == string_element: # if character is equal to the string

          countOfChar += 1 # count the occurrence of character

   print("Count of character '{}' is {}".format(string_element, countOfChar))  

# print the character.

The output of the program is also attached.

The complete program is given below:

"

Write a Python program that ask user to enter the input sentence. Then,  the program should then output the list of characters, including white spaces and punctuation marks, and the number of times each character appears in the input.

"

You can learn more about character counter in python at

https://brainly.com/question/24275769

#SPJ4

   

The CPU executes instructions in response to commands. true or false

Answers

Answer:

true

Explanation:

Answer:   True

Explanation:   I took the test and passed :)

known for its software products, including microsoft windows operating systems, the microsoft office suite, and the internet explorer web browser, microsoft's big break was in 1980, when a partnership was formed with ibm which resulted in microsoft providing a crucial operating system, dos, for ibm pcs. this meant that for every ibm computer sold a royalty was paid to microsoft.

Answers

Microsoft is known for its software products, windows, office suite, and for internet explorer.

Microsoft is considered the pioneer in computer technology and software. The question is asked about who is known for the given scenario in this question. The best answer to this question is Microsoft. Because Microsoft in the world is known for its software products in the industry such as Microsoft Windows operating systems, Microsoft Office, office 365, internet explorer, and Microsoft Edge as a web browser.

However, the remaining text in the given question is not part of the question. This text is an history fact of Microsoft.

You can learn more about Microsoft products at

https://brainly.com/question/28167634

#SPJ4

WD9102 Apply a shape style.

Answers

If you want to apply a shape style, you must require to tap on the Format tab followed by clicking the More drop-down arrow in the Shape Styles group.

How to know the actual or real style of shape?

To know the actual or real style of shape, go to the Drawing Tools menu in the ribbon. Then, Click on the Format tab. Observe the Shape Styles grouping of commands. Here, you will see three icons on the right side, they are Shape Fill, Shape Outline, and Shape Effects.

After clicking the More drop-down arrow in the Shape Styles group, a complete menu of styles will appear in front of you on the screen. Choose the style you want to use. The shape will appear in the selected style.

Therefore, the process of applying shape style is well described above.

To learn more about Word Shape styles, refer to the link:

https://brainly.com/question/938171

#SPJ1

the operation of verifying that the individual (or process) is who they claim to be is known as? complete mediation access control authentication verification

Answers

The operation of verifying that the process or individual is who they claim to be is known as authentication. Thus, the correct option to this question is an option (C) i.e. authentication.

Authentication is an operation that is commonly used in computer language or in software engineering to verify the person or process what they ought to be. Authentication operation verifies that the person, individual, or process accessing the system is the authenticated individual, person, or user.

While the other options are incorrect because:

The term complete mediation is used to check that access to the object is allowed. While access control is a measure to control access to the system by an unauthenticated process or user. Whereas, the verification verifies that the user or process is original.

The complete question is given below

"

The operation of verifying that the individual (or process) is who they claim to be is known as?

A. complete mediation

B. access control

C. authentication

D. verification "

You can learn more about authentication at

https://brainly.com/question/13615355

#SPJ4

uppose you are writing an anonymous javascript function that will run when your web page loads, and you want to include a statement that will cause a selection list in a web form to become active and ready for data entry. which method should you apply in this statement?

Answers

If you wish to include a statement that makes a selection list in a web form active and ready for data entry, you should use the element.select() method when developing an anonymous javascript function that runs when your web page starts.

A section of code called a JavaScript function is created to carry out a certain task.

When "something" invokes a JavaScript function, it begins to run (calls it).

A JavaScript function is created by using the function keyword, a name, and then parenthesis ().

Letters, numbers, underscores, and dollar signs can all be used in function names (same rules as variables).

Comma-separated parameter names may be included in parentheses: (parameter1, parameter2, ...)

Curly brackets are used to surround the code that the function will run: {}

In the function definition, the parameters are specified between parentheses ().

The values passed to the function as arguments are known as function arguments.

The parameters (the arguments) behave like local variables inside the function.

Learn more about javascript here

https://brainly.com/question/28448181

#SPJ4

smart detection can detect the gradual degradation of a web app’s response time caused by a memory leak. select yes if the statement is true. otherwise, select no.

Answers

Yes, smart detection can detect the gradual degradation of a web app's response time caused by a memory leak.

The given statement is very true . Smart Detection can detect a performance issue that affects the time. One instant can be seen where pages are loading more slowly on one type of browser than others.

Learn more about smart detection here:

https://brainly.com/question/26199042

#SPJ4

calories burned running on a particular treadmill, you burn 4 calories per minute. write a program that uses a loop to display the number of calories burned after 5, 10, 15, 20, 25, and 30 minutes.

Answers

def calorie_burned(time):

   cal_burn=time*4

   return cal_burn

run_time=[10, 15, 20, 25, 30]

for rt in run_time:

   print(calorie_burned(rt))

One execution of the initialization statement.

Evaluation of the test expression follows. The for loop is stopped if the test expression returns false.

The update expression is updated, though, if the test expression is assessed as true. If so, the for loop's body statements are then carried out.

Iteratively evaluating the test statement

The test expression remains true throughout this process. The loop is broken when the test expression returns false.

Look up relational and logical operators to find out more about test expression (when the test expression is evaluated to true and false).

Learn more about  test expression here:

https://brainly.com/question/14390367

#SPJ4

Create a class named BloodData that includes fields that hold a blood type (the four blood types are O, A, B, and AB) and an Rh factor (the factors are + and –). Create a default constructor that sets the fields to O and +, and an overloaded constructor that requires values for both fields. Include get and set methods for each field. Save this file as BloodData.java. Create an application named TestBloodData that demonstrates each method works correctly

Answers

Answer:

Question: 1. Create A Class Named BloodData That Includes Fields That Hold A Blood Type (The Four Blood Types Are O, A, B, And AB) And An Rh Factor (The Factors Are + And –). Create A Default Constructor That Sets The Fields To Oand +, And An Overloaded Constructor That Requires Values For Both Fields. Include Get And Set Methods For Each Field. 2. Create A

This problem has been solved!

You'll get a detailed solution from a subject matter expert that helps you learn core concepts.

See Answer

1. Create a class named BloodData that includes fields that hold a blood type (the four blood types are O, A, B, and AB) and an Rh factor (the factors are + and –). Create a default constructor that sets the fields to Oand +, and an overloaded constructor that requires values for both fields. Include get and set methods for each field.

2. Create a class named Patient that includes an ID number, age, and BloodData. Provide a default constructor that sets the ID number to 0, the age to 0, and the BloodData values to O and +. Create an overloaded constructor that provides values for each field. Also provide get methods for each field.

public class BloodData {

private String bloodType;

private String rhFactor;

public BloodData() {

}

public BloodData(String bType, String rh) {

}

public void setBloodType(String bType) {

}

public String getBloodType() {

}

public void setRhFactor(String rh) {

}

public String getRhFactor() {

}

}

public class Patient {

private String id;

private int age;

private BloodData bloodData;

public Patient() {

}

public Patient(String id, int age, String bType, String rhFactor) {

}

public String getId() {

}

public void setId(String id) {

}

public int getAge() {

}

public void setAge(int age) {

}

public BloodData getBloodData() {

}

public void setBloodData(BloodData b) {

}

}

public class TestBloodData {

public static void main(String[] args) {

BloodData b1 = new BloodData();

BloodData b2 = new BloodData("A", "-");

display(b1);

display(b2);

b1.setBloodType("AB");

b1.setRhFactor("-");

display(b1);

}

public static void display(BloodData b) {

System.out.println("The blood is type " + b.getBloodType() + b.ge

Explanation:

The class named BloodData that includes fields that hold a blood type (the four blood types are O, A, B, and AB) and an Rh factor (the factors are + and –) is in the explanation part.

What is programming?

Computer programming is the process of performing specific computations, typically through the design and development of executable computer programmes.

Here is the implementation of the BloodData class as described:

public class BloodData {

   private String bloodType;

   private char rhFactor;

   

   public BloodData() {

       this.bloodType = "O";

       this.rhFactor = '+';

   }

   

   public BloodData(String bloodType, char rhFactor) {

       this.bloodType = bloodType;

       this.rhFactor = rhFactor;

   }

   

   public String getBloodType() {

       return bloodType;

   }

   

   public char getRhFactor() {

       return rhFactor;

   }

   

   public void setBloodType(String bloodType) {

       this.bloodType = bloodType;

   }

   

   public void setRhFactor(char rhFactor) {

       this.rhFactor = rhFactor;

   }

}

Thus, this implementation demonstrates the creation of BloodData objects with default and custom values.

For more details regarding programming, visit:

https://brainly.com/question/11023419

#SPJ2

your company runs mostly windows 10 clients on employee computers but you have been told that the engineering department will being using fedora linux soon. you want to become more familiar with fedora linux but you don't have any unallocated disk space on your office computer which runs windows 10. how can you become familiar with fedora linux without disturbing your current windows 10 installation?

Answers

The way that a person could become familiar with Fedora Linux without disturbing your current Windows 10 installation is Option b. Run a Live install.

What is Fedora Linux used for?

The purpose of Fedora Linux is that Software developers and community members can create custom solutions for their consumers thanks to Fedora's innovative, free, and open source platform for hardware, clouds, and containers.

When Windows 10 is booted on a PC running Linux, all of the data on the machine is wiped clean.

Backing up or restoring the current data on the Windows 10 computer is not possible when the setup.exe application is performed from the Linux DVD that runs Linux on Windows.

Therefore,  Use a computer of your choosing, boot from the DVD, and conduct the evaluation without setting up Linux on the hard drive and also Install Linux in a virtual machine that you create.

Learn more about Linux  from

https://brainly.com/question/12853667
#SPJ1

See full question below

Your company runs mostly Windows 10 clients on employee computers but you have been told that the engineering department will being using Fedora Linux soon. You want to become more familiar with Fedora Linux but you don't have any unallocated disk space on your office computer which runs Windows 10. How can you become familiar with Fedora Linux without disturbing your current Windows 10 installation?

a. Install it in a container.

b. Run a Live install.

c. You can't do this.

d. Run it in Sandbox mode.

Write a function duplicate_link that takes in a linked list link and a value. Duplicate_link will mutate link such that if there is a linked list node that has a first equal to value, that node will be duplicated. Note that you should be mutating the original link list link; you will need to create new links, but you should not be returning a new linked list.

Answers

A function duplicate_link that takes in a linked list link and a value and mutates such that if there is a linked list node that has a first equal to value, that node will be duplicated is given below:

The Function

void Form2NoDupListsUsgGivenList(Node * head1, Node *& head2)

{

  head2 = 0;

 

  if(!head1)

     return;

 

  Node * pre  = 0,

       * cur1 = 0;

 

  pre = head1;

  cur1 = head1->link;

 

  /****************************************************************************

   * FIRST CASE: add the first node to the second list

   ***************************************************************************/

  while(cur1)

  {

     if(cur1->data == head1->data) //a duplicate was found

     {

        if(!head2)                 //it was the first duplicate

        {

           pre->link = cur1->link;            

           head2 = cur1;

           head2->link = 0;

           cur1 = pre->link;

        }

        else                       //it was not the first duplicate

        {

           pre->link = cur1->link;

           delete cur1;

           cur1 = pre->link;

        }

     }

     else                          //increment

     {

        pre = cur1;

        cur1 = cur1->link;

     }

  }

 

  if(!head2)        //there were no duplicates of the first item in list 1

  {

     Node * newNode = new Node;

     newNode->data = head1->data;

     newNode->link = 0;

     head2 = newNode;

  }

 

 

  /****************************************************************************

   * ALL OTHER CASES

   ***************************************************************************/

 

  Node * listAnchor = head1->link,    //points to node being checked

       * cur2       = head2;          //points to the end of list2

                                      //cur2 will contain 0 until it has

                                      //received a dup from list1 or a new

                                      //Node has been created and appended

                                     

 

  while(listAnchor)                            //while nodes in first list

  {

     pre = listAnchor;

     cur1 = listAnchor->link;

     

     while(cur1)                               //listAnchor not last element

     {

        if(cur1->data == listAnchor->data)     //duplicate found

        {

           if(cur2->data != listAnchor->data)  //it's the first duplicate

           {

              pre->link = cur1->link;

              cur2->link = cur1;

              cur2 = cur2->link;

              cur2->link = 0;

              cur1 = pre->link;

           }

           else                                //it's not the first duplicate

           {

              pre->link = cur1->link;

              delete cur1;

              cur1 = pre->link;

           }

        }

        else

        {

          pre = cur1;

           cur1 = cur1->link;

        }

     }

     if(cur2->data != listAnchor->data)      

     {

        Node * newNode = new Node;

        newNode->data = listAnchor->data;

        newNode->link = 0;

        cur2->link = newNode;

        cur2 = cur2->link;

     }

                       

     listAnchor = listAnchor->link;        

  }

}

Read more about programming functions here:

https://brainly.com/question/179886

#SPJ1

Other Questions
Who dies in the Outsiders? the question is in the picture Segment BD bisects ZABC. Solve for 2. Round to the nearest tenth, if necessary.(Image not necessarily to scale.) MODELING REAL LIFE A football player punts a football from a height of 2 feet. The ball reaches a maximum height of50 feet after traveling 56 feet horizontally, and is caught 111 feet from where the ball was kicked. The path of the ball canbe modeled by a parabola, where y is the height (in feet) and x is the horizontal distance traveled (in feet). At what heightis the ball caught? Round your answer to the nearest tenth. Why do "You Think" some bacteria grow better in your gut rather than your lungs or skin? Increasing the minimum wage could result in increased revenues for the federal government for which of the following reasons? A. If the minimum wage increases, corporate costs increase. B. If the minimum wage increases, state sales taxes get a boost. C. If the minimum wage increases, local property values skyrocket. D. If the minimum wage increases, there is an increase in payroll taxes collected. What benefits do you think Leonardo Fibonacci might have seen in the Indo- Arabic numerals Gigi makes a scale drawing of a patio the drawing below shows the two scales she used to plan two patios of different sizes an airplane covers 1259km in an hour find the distance it will cover 23/6 hours Marcus has a 48-ounce soda. He drinks 15 ounces. What is the percentage of ounces Marcus has left from his soda? Round your answer to the nearest tenth. A) 68.8B) 45.6C) 86.8D) 34.9 Which of the following is the most significant effect of satellite technology on weather prediction?O the five-day forecast for hurricane intensity now has an accuracy of less than 1% for wind speedO multiple computer models can make the same predictions well in advance of stormsO the exact location of a tornado can be predicted 6 hours in advanceincreased preparedness can save lives and property Mr smith wants to put fence around his yard the dimensions of the yard are 61ft by 39ft the fencing is sold in whole meters how much fencing should he buy Peggy was playing with a small black bug. When her mother saw it, she started screaming, frightening Peggy. Now, whenever Peggy sees a bug, she becomes frightened Shape A and B are mathematically similar.The area of shape A is 210 cm.A21 cmBArea =42 cmWork out the area of shape B. a researcher conducts a study and finds that the difference between the population mean () and the sample mean (m) is 4, the sample size (n) is 36, and the standard deviation of the population () is 3.5. what is the value of cohen's d? 25. The Lewis dot symbol for I has how many dots?7 56 4 The music industry utilizes editors inwhich of the following ways?A. musiciansC. performancesB. videosD. lyrics assume the following information: milling department units percent complete materials conversion beginning work in process inventory 200 40% 30% units started into production during march 6,200 units completed during the period and transferred to the next department 5,800 100% 100% ending work in process inventory 600 70% 60% milling department materials conversion cost of beginning work in process inventory $ 10,000 $ 15,000 costs added during the period 290,000 385,000 total cost $ 300,000 $ 400,000 using the weighted-average method, the total cost of the ending work in process inventory with respect to conversion is closest to: Question 21XThe Diet of WormsAnswers:A, was an assembly of nobles and papal leadersB. called Luther to recant his writingsC, allowed Luther to explain himselfD. exonerated Luther entirelyE, ordered Luther to be executed on charges of heresy What are some of the challenges to hipaa compliance in a more complex and dynamic information and technology infrastructure? new ways to connect new care delivery models new types of information all of the choices.