subject
Computers and Technology, 13.05.2021 18:20 2006260

For your eleventh programming assignment you will be implementing a program that uses a linked list. You will be implementing the following structure and functions:
struct LinkedList
{
int value;
LinkedList *next;
};
append_node: Appends a new node (created using the new statement) to the end of the linked list.
insert_node: Inserts a new node (created using the new statement) at the specified location in the list.
delete_node: Deletes a node from the specified location in the list search_node: searches the list for a value.
destroy_list: At the end of the program, this function loops through the entire list and destroys the list by using the delete statement on each dynamically allocated linked list node (to avoid a memory leak). Note that with a singly linked list, you need to maintain a head pointer (pointer to the beginning of the list). Typically, a tail pointer (pointer to the end of the list) is not maintained in a singly linked list (because you can only iterate from the beginning to the end), although it can be.
Enter the number of initial nodes (must be at least 1): -1
Enter the number of initial nodes (must be at least 1): -2
Enter the number of initial nodes (must be at least 1): 7
Enter a number: 0
Enter a number: 5
Enter a number: 10
Enter a number: 15
Enter a number: 20
Enter a number: 25
Enter a number: 30
Here are the initial values in the linked list:
0
5
10
15
20
25
30
Enter a number for a new node to insert to the linked list:
17 Here is the updated linked list:
0
5
10
15
17
20
25
30
Enter the number of the node that you want to delete from the linked list: 25
Here is the updated linked list:
0
5
10
15
17
20
30
Enter the number that you want to search for in the list: 20
Number found at index 5 in the linked list
Press any key to continue...

ansver
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 01:20, sosick90501
Write a function balancechemical to balance chemical reactions by solving a linear set of equations. the inputs arguments are: reagents: symbols of reagents in string row array products: symbols of products in string row array elements: elements in the reaction in string row array elcmpreag: elemental composition of reactants in two dimensional numeric array elcmpprdcts: elemental composition of prducts in two dimensional numeric array hint: the first part of the problem is setting up the set of linear equations that should be solve. the second part of the problem is to find the integers from the solution. one way to do this is to mulitiply the rational basis for the nullspace by increasing larger integers until both the left-and right-side integers exist. for example, for the reaction that involves reacting with to produce and : reagents=["ch4", "o2"]; products =["co2", "h2o"]; elements =["c","h", "o"] elcmpreag=[1,4,0;
Answers: 3
image
Computers and Technology, 23.06.2019 01:20, shiann2002
Me with this program in c++ ! computers represent color by combining sub-colors red, green, and blue (rgb). each sub-color's value can range from 0 to 255. thus (255, 0, 0) is bright red. (130, 0, 130) is a medium purple. (0, 0, 0) is black, (255, 255, 255) is white, and (40, 40, 40) is a dark gray. (130, 50, 130) is a faded purple, due to the (50, 50, 50) gray part. (in other word, equal amounts of red, green, blue yield gray).given values for red, green, and blue, remove the gray part. ex: if the input is 130 50 130, the output is: 80 0 80. thus, find the smallest value, and then subtract it from all three values, thus removing the gray.
Answers: 3
image
Computers and Technology, 23.06.2019 13:00, jaelynnm
Donnie does not have powerpoint. which method would be best for elana to save and share her presentation as is? a pdf a doc an rtf a ppt
Answers: 3
image
Computers and Technology, 23.06.2019 19:30, sallybob0
What are loans to a company or government for a set amount of time
Answers: 1
You know the right answer?
For your eleventh programming assignment you will be implementing a program that uses a linked list....

Questions in other subjects:

Konu
Mathematics, 18.03.2021 02:00
Konu
Mathematics, 18.03.2021 02:00
Konu
Mathematics, 18.03.2021 02:00
Konu
Mathematics, 18.03.2021 02:00