5.29 ZyLab CCNY Addition 3 Suppose that a static vector variable holding integers, sw, cannot be modified after values a
Posted: Mon May 02, 2022 12:17 pm
5.29 ZyLab CCNY Addition 3 Suppose that a static vector variable holding integers, sw, cannot be modified after values are placed. Suppose also that there is another vector holding integers, pv, which indicate positions (indexes) of values in sw. The mission of this assignment is to generate a pri to hold a positional order of sw values such that the sorted order of the numbers in svi can be obtained by visiting from top to bottom of pw. This is to realize the indirect sorting of values that are stored in an area that cannot be modified V1: 4. 9. 5.7.0.15, 8, 2, 3, 5, 1, 6, 3,8 pyt 4, 11, 5, 8, 13, 9. 0. 10, 62, 12, 3, 14, 7, 1 Bye. Implement as shown above by generating 15 random values between 0 and 9 in sy and then populating pw by finding out the minimum values from svi one by one, as done by the previous Zylab assignment Notice that the position of te value is selected from the higher position, eg, for the value 1 in svi, position 11 is chosen first instead of position in the above example For your submission, set 103 to the seed of random number generation. You can submit up to three times 0/20 LAD ACTIVITY 6.29.1. 2yLab CONY Addition 3 main.cpp Land default template 1 winclude ciostream 2 #include <vector 3 #include <cstdlib> 4 using namespace std: 5 6 int main4 7 vectorcint svi, pvi; 8 9 cout << "Bye..." << endl; 18 return : 11)