Question: Can someone please help me in c++ ? Exercise 1: Enter a string through the keyboard For end press Ctrl+A Enter an integer number through
Can someone please help me in c++ ?
Exercise 1: Enter a string through the keyboard For end press Ctrl+A Enter an integer number through the keyboard Create an undirected graph whose vertices will have the values of the characters of the string, and the edges will be randomly generated, with the highest value of any edge being the value entered through the keyboard Create two queues, one that will receive integer values, and the other one characters In the first one enter the values of the edges in the graph sorted in descending order In the second one enter the vertices among which are those edges, each separated by a comma and a space Print the two queues
Exercise 2: Enter a string through the keyboard For end press Ctrl+A Enter an integer number through the keyboard Create a directed graph whose vertices will have the values of the characters of the string, and the edges will be randomly generated, with the highest value of any edge being the value entered through the keyboard Create a function that will return a minimum spanning tree for the given graph according the Dijkstras algorithm, which will have the greatest total weight of all possible minimum spanning trees of that graph In other words, calculate the sum of the edges of the minimum spanning trees starting from each vertex in the graph and choose what MST (and its initial vertex) which has the largest total weight of its edges
Exercise 3: Enter a string through the keyboard. For end press Ctrl + A. Enter the string (the characters) into a queue and print it. Calculate the mean (average) ASCII value of all the characters in the queue. Then, find the intermediate element (the one that has the lowest difference with the average value)Print the character and its ASCII code.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
